Add new comment

How do I correct white balance?

I am using libraw to convert a NEF file to a bmp file.
The order I call the functions are as follows -

LibRaw RawProcessor;
RawProcessor.open_file();
libraw_data_t imgD=RawProcessor.imgdata;
imgD.params.use_camera_wb=1;
imgD.params.user_flip = 3;
RawProcessor.unpack()
RawProcessor.dcraw_process();
processedImg=RawProcessor.dcraw_make_mem_image()

Now I have tried to write my bitmap in two ways -
1. processedImg->data[]
2. RawProcessor.copy_mem_image();

Neither have created me a .bmp file with the correct white balance. However, creating a ppm file using one of the samples produces a faithful reproduction. What am I doing wrong?

Sorry if this is a duplicate - My first post did not show up and stated unpublished.

Forums: