iPhone 11 Halide DNG gives black image.

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:


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.