I am using libraw to try and read an image from an iPhone 11. I use the libraw->rawdata.raw_image field to access bayer data.
I have also tried converting the image with dng converter (no compression) and libraw still gives a black image.
Why could this error be happening?
The DNG file is here:
https://drive.google.com/file/d/1SlVyBiHgIamv7Z8G6qhA6A4KyTwxpvqZ/view?u...
Here is TIFF-file created by
Here is TIFF-file created by dcraw_emu -w -T [your-file]: https://www.dropbox.com/s/b4st4g9o5846l6f/IMG_2407.DNG.tiff?dl=0
(tested with public snapshot/github version).
I do not see any problems here
-- Alex Tutubalin @LibRaw LLC
Thank you. I looked in to
Thank you. I looked in to this more, it turns out the libraw->rawdata.color.cam_xyz field is blank with DNG images. I had to look at libraw->rawdata.color.dng_color
Sorry about the mistaken post!
I have a suggestion: Maybe put DNG's ColorMatrix2 (Daylight) in to the cam_xyz field? It might reduce confusion for some developers.
I am using build from latest source code from github.
Not sure it is good idea
Not sure it is good idea (unless specified explicitly by library user via some flag?)
cam_xyz contains built-in data (from colordata.cpp), dng_color filled by DNG tags, not sure DNG data should always overwrite built-in data.
-- Alex Tutubalin @LibRaw LLC
Btw, there is zero guarantee
Btw, there is zero guarantee that in a DNG that ColorMatrix2 corresponds to D65 illuminant, or that there is one corresponding to a D65 illuminant at all. It is just a recommendation, not a requirement.