pub unsafe fn decode_into( r: &mut impl Read, buf: impl FnOnce(usize) -> Result<*mut MaybeUninit<u8>, Box<dyn Any + Send + 'static>> ) -> Result<(Color, (u32, u32)), Error>
Decodes a DIB/BMP. Takes a function that will allocate n bytes, and return a pointer to the allocation.
n
undefined behaviour if the allocation is not n bytes
ideally this would be unsafe impl FnOnce, but that doesnt work.
unsafe impl FnOnce