LibRaw 1.7beta1 vs dcraw 9.26 result

I was trying to get the similar output to dcraw 9.26-x64 from LibRaw 1.7beta1-x64, but had no luck. Is it possible to get the exact 1:1 match to dcraw? It seems LibRaw is performing some sort of auto adjustment beyond "no_auto_bright", I tried "no_auto_scale" from my code too but it didn't help.

dcraw command:
"dcraw.exe" -v -w +M -n 10 -H 0 -o 1 -W -g 1.0 1.0 -q 3 -6 -4 -T "image.cr2"

dcraw_emu command:
"dcraw_emu.exe" -v -w +M -n 10 -H 0 -o 1 -W -g 1.0 1.0 -q 3 -6 -4 -T "image.cr2"

I uploaded a sample here:

Thank you!


Yes, LibRaw performs

Yes, LibRaw performs automatic maximum adjustment to prevent 'pink clouds' (and other highlights) problem seen on many cameras where real maximum varies with ISO or other camera settings.

To turn it off, use '-c 0' switch of dcraw_emu (or set imgdata.params.adjust_maximum_thr to 0.0).

Simple test:

$ ./bin/dcraw_emu -h -c 0 ~/temp/camera04_01.CR2
$~/dcr926/dcraw -h ~/temp/camera04_01.CR2
$ md5 ~/temp/camera04_01.*ppm
MD5 (/home/lexa/temp/camera04_01.CR2.ppm) = 6bc70a092bb0096bd75d1f9ef54714b4
MD5 (/home/lexa/temp/camera04_01.ppm) = 6bc70a092bb0096bd75d1f9ef54714b4
So, two PPMs (from dcraw 9.26 and from LibRaw's dcraw_emu) are binary the same.

-- Alex Tutubalin @LibRaw LLC

P.S. Please note -h key (half

P.S. Please note -h key (half interpolation), because AHD interpolation is slightly different in LibRaw and dcraw.

For binary comparison, you may use -q 1 (VNG interpolation, same in LibRaw and dcraw).

-- Alex Tutubalin @LibRaw LLC