Add new comment

Force Daylight WB?

When I set use_camera_wb and use_auto_wb both to zero, I get a yellow cast on the image. When I set use_camera_wb to 1 and take the same photo with camera WB set to daylight it there is no yellow cast. (Camera is Sony A7R4, but I get similar results from Olympus Pen-F). I can email you sample images if you don't believe me.

Is anything else that could affect WB?

Here is the code I am using to read and process the image:

// create an image processor

LibRaw iProcessor;

// open the file and read the metadata

err = iProcessor.open_file(pathname);
if(err != 0)

// set to 16-bit output

iProcessor.imgdata.params.output_bps = 16;
iProcessor.imgdata.params.no_auto_bright = 1;
iProcessor.imgdata.params.use_camera_wb = 0;
iProcessor.imgdata.params.use_auto_wb = 0;

// metadata is accessible through data fields of the class

nx = iProcessor.imgdata.sizes.width;
ny = iProcessor.imgdata.sizes.height;

// unpack the image

err = iProcessor.unpack();
if(err != 0)
goto error;

// process the image

err = iProcessor.dcraw_process();
if(err != 0)
goto error;