Page 1 of 1

dcraw messed up highlights

Posted: 2018-07-21T06:50:27-07:00
by olegk
dcraw in version 7.0.8-7 makes burned-out skies purple in highlight-blend mode.

Camera - Sony Alpha 5100.

The command:
dcraw.exe -v -H 2 -o 1 -q 3 -g 2.4 12.9 -b 1.7 -r 2448.000000 1024.000000 1992.000000 1024.000000 -t 0 DSC00538-00542_l.ARW

As a reference I keep dcraw version compiled from dcraw.c published by David Coffin back in 2016. This one doesn't exhibit such a problem. Screen output from the two dcraw versions is identical - see the textfile in the link below.

Here are the RAW file and two versions of the output - _bad with the new dcraw, _good with the old one.
https://www.dropbox.com/sh/v5n4pw22y8qe ... yUBVa?dl=0


Regards,
Oleg.

Re: dcraw messed up highlights

Posted: 2018-07-21T06:56:09-07:00
by olegk
An addition:
- using -H 1 (unclip) produces the same result
- using -H 0 (clip) produces clipped highlights as expected

Re: dcraw messed up highlights

Posted: 2018-07-21T07:22:21-07:00
by snibgo
This is an ImageMagick forum. Queries about dcraw should be directed elsewhere. The only patch that IM adds to dcraw is for the "-O" option.

However, in my experience, dcraw v9.27 with "-H 2" doesn't make purple skies.

I have written about dcraw and WB and clipping and contrast.

Re: dcraw messed up highlights

Posted: 2018-07-23T07:45:12-07:00
by olegk
Sorry if I'm looking "nasty", but the problem is specifically with dcraw included with Imagemagick.

Yesterday I downloaded and compiled dcraw.c from https://www.cybercom.net/~dcoffin/dcraw/ .
The resulting executable works fine.

Regarding the version number - it isn't changed for the last 2 years. The source code is updated (at least became larger), but the version is stuck at 9.27.

I thought David Coffin stopped supporting dcraw, but yesterday I as pleasantly surprised to find newer (larger) source file and newer cameras in the compatibility list.

Re: dcraw messed up highlights

Posted: 2018-07-23T09:04:28-07:00
by snibgo
olegk wrote:Regarding the version number - it isn't changed for the last 2 years.
Ah, I didn't know that. As far as I know, the IM build process downloads dcraw.c, patches it to add "-O", and builds it. It's possible that the IM patch has created the "-H 2" purple sky problem, but it seems more likely that some version (of dcraw v9.27) had that problem, and that's what IM uses. Perhaps IM only downloads dcraw.c when its version number changes.

The development version of IM includes dcraw.c, so diffs could be made with dcraw.c downloaded from Dave Coffin, if someone wanted to trace the problem. Not everyone builds software, and the binary of dcraw provided with IM should work as well binaries from Dave Coffin. Perhaps a developer will take a look.

Personally, I don't use the dcraw provided by IM because (a) IM doesn't give me the control I need through the delegate mechanism and (b) I have a testing process for new versions of software, and I update dcraw independently of IM and (c) I have customised dcraw for my own purposes.

Re: dcraw messed up highlights

Posted: 2018-07-24T21:50:16-07:00
by dlemstra
We have switched from dcraw.exe to libraw under Windows. Are you sure you are forcing the use of dcraw.exe instead?

Re: dcraw messed up highlights

Posted: 2018-07-25T01:33:35-07:00
by snibgo
dcraw.exe is still included with IM Windows binaries, at least for v6.9.9-50.

Re: dcraw messed up highlights

Posted: 2018-07-25T22:42:41-07:00
by dlemstra
We still include it because it has some tweaks to make it work with ImageMagick and we added OpenCL support.

Re: dcraw messed up highlights

Posted: 2018-08-02T08:16:23-07:00
by olegk
What do you mean under "force"?
I needed the dcraw command line utility with its historical switches; that's why I tried to use it.

Do you say you aren't recommending to use the one supplied with ImageMagick?

Regards,
Oleg.