Add new comment

The data values in image[]

The data values in image[] (and raw_image) array are in linear space

The gamma correction applied only on output (dcraw_make_mem_image(), dcraw_ppm_tiff_writer() calls)
convert_to_rgb() only fills the curve[] with gamma_curve() call and rgb maximum calculated on convert-to-rgb stage.

If you need linear output in dcraw_make_mem_image()/ppm_tiff_writer, set output_params.gamm[0] and [1] to 1.0

-- Alex Tutubalin @LibRaw LLC