I'm trying to get unscaled values from a Canon CR2 file
The camera has a 12bit imager and imgdata.color.maximum=3712 and the channel maximums are in line with this.
But the data returned from dcraw_process() is scaled into the range 0 - 64K even with histogram stretching off.
output->output_bps = 16;
output->no_auto_bright = 1;
output->gamm = output->gamm = 1;
output->adjust_maximum_thr = 0.0;
If I set document mode=2 (no white balance) the values are in range but not debayered, and data.data_size is only width * height * 3
The data scaling is performed
The data scaling is performed before interpolation.
So, there is no way to get debayered and unscaled data. You may remove call to scale colors or rewrite this call (LibRaw::scale_colors) if you wish.
-- Alex Tutubalin @LibRaw LLC