Add new comment

use_camera_wb

Hello,

I can't seem to get the libraw_data_t->params.use_camera_wb flag to work. I suspect I'm doing something wrong.

I have a Sony .ARW file which unpacks with the wrong colors if use_camera_wb isn't set to 1. It unpacks correctly under dcraw with use_camera_wb set to 1.

Setting this item to 1 in libraw causes it to unpack with the wrong colors.

Here's a simplified version of what I'm doing - I'm using the libraw C interface.

libraw_data_t *lrd=libraw_init(0);

lrd->params.use_camera_wb=1;

libraw_open_file(lrd,path)

libraw_unpack(lrd);

libraw_dcraw_process(lrd);

libraw_processed_image_t *lpi=libraw_dcraw_make_mem_image(lrd,&err);

//and then we read the pixels out of lpi->data and put them in a Windows device-independent bitmap

Any suggestions what's wrong? Most raw files unpack correctly.

Thanks, and thanks for an excellent library.

::Jack

Forums: