Latest IM ignores delegates?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 9720
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Latest IM ignores delegates?

Post by snibgo » 2018-02-09T16:06:41-07:00

Are you asking me, Fred? I don't know, I'm just going by Magick's announcement I linked above, and the latest source code in coders\dng.c.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 22653
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Latest IM ignores delegates?

Post by fmw42 » 2018-02-09T16:08:42-07:00

snibgo wrote:
2018-02-09T16:06:41-07:00
Are you asking me, Fred? I don't know, I'm just going by Magick's announcement I linked above, and the latest source code in coders\dng.c.
Yes, but I missed your link. That suffices. Thanks.

User avatar
fmw42
Posts: 22653
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Latest IM ignores delegates?

Post by fmw42 » 2018-02-09T16:10:41-07:00

Interesting. I checked and do not have libraw installed. So if it is using it, then libraw must be somehow built directly into ImageMagick, which is I guess what you were implying by "internal" vs "external"

snibgo
Posts: 9720
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Latest IM ignores delegates?

Post by snibgo » 2018-02-09T16:53:24-07:00

There is a switch within coders\dng.c which uses either libraw or an external delegate. So I guess that if libraw is not available at compile time, the delegate will be used.

The OP is on Windows, so I guess is using a pre-built binary, which I guess includes libraw.
snibgo's IM pages: im.snibgo.com

ravengangrel
Posts: 9
Joined: 2018-02-08T14:05:15-07:00
Authentication code: 1152

Re: Latest IM ignores delegates?

Post by ravengangrel » 2018-02-09T18:11:31-07:00

fmw42 wrote:
2018-02-09T13:27:49-07:00
If I convert the DNG to JPG and open both in Photoshop, they both look almost the same. The JPG is slightly darker, but not by much. There is no extra yellow cast to the JPG in comparing to the DNG. It might be simply a difference in brightness adjustment in the DNG when opened in PS from the DNG meta data. ImageMagick via ufraw delegate may not be handling that meta data exactly the same.
How did you convert it? With "magick" or "magick convert" I get a nice colored image, but too small; 160x120 while the original file is 5472x3648.

My commandline:
>magick Img_0851.dng IMG_0851.jpeg
magick: Unknown field with tag 50970 (0xc71a) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/994.
magick: Incorrect count for "DNGPrivateData"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/994.
magick: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/994.
magick: Unknown field with tag 34865 (0x8831) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/994.
magick: Unknown field with tag 50970 (0xc71a) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/994.
magick: Incorrect count for "DNGPrivateData"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/994.


>dir img_0851.*
05/12/2017 04:11 19.420.975 IMG_0851.DNG
10/02/2018 02:06 3.656 IMG_0851.jpeg
With "magick mogrify", however, I get the yellow cast. Don't you? May it be a windows issue?

User avatar
fmw42
Posts: 22653
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Latest IM ignores delegates?

Post by fmw42 » 2018-02-09T18:30:51-07:00

I used IM 7.0.7.22 Q16 Mac OSX installed with ufraw delegate from source using MacPorts to install my delegates and compiled IM from source.

Code: Select all

magick DNG:IMG_0851.DNG IMG_0851.JPG

Code: Select all

magick identify -verbose IMG_0851.JPG
Image: IMG_0851.JPG
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 5488x3664+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: TrueColor
  Base type: Undefined
  Endianess: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
See snibgo's comment about using the external ufraw delegate as I did vs using a binary install that probably uses libraw.

Did you preface your input with DNG:

snibgo
Posts: 9720
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Latest IM ignores delegates?

Post by snibgo » 2018-02-09T18:40:11-07:00

ravengangrel wrote:... I get a nice colored image, but too small; 160x120 while the original file is 5472x3648.
That is almost certainly from a JPEG embedded in the DNG file, not a de-Bayering etc of the raw image.
snibgo's IM pages: im.snibgo.com

ravengangrel
Posts: 9
Joined: 2018-02-08T14:05:15-07:00
Authentication code: 1152

Re: Latest IM ignores delegates?

Post by ravengangrel » 2018-02-10T02:05:51-07:00

snibgo wrote:
2018-02-09T18:40:11-07:00
That is almost certainly from a JPEG embedded in the DNG file, not a de-Bayering etc of the raw image.
Yeah, that was my guess some messages ago.

So, in short,

1) Is there some way to make IM use the full image, instead of the embedded thumbnail? I've tried with IMG_0851.dng[1] but no luck (IMG_0851.dng[0] works but uses the thumbnail).

2) Is there some way to change the white balance used by mogrify, short of recompiling without libraw?

3) Is there some kind of guide to windows compilation?

Thank you both very much for your help.

ravengangrel
Posts: 9
Joined: 2018-02-08T14:05:15-07:00
Authentication code: 1152

Re: Latest IM ignores delegates?

Post by ravengangrel » 2018-02-10T02:08:00-07:00

fmw42 wrote:
2018-02-09T18:30:51-07:00
Did you preface your input with DNG:
Yes, sorry, that was the first thing I tried. I tended to always do it because it used to work with weird or new RAW formats not yet recognized by ImageMagick but supported by newer versions of ufraw/dcraw.

snibgo
Posts: 9720
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Latest IM ignores delegates?

Post by snibgo » 2018-02-10T08:32:52-07:00

ravengangrel wrote:1) Is there some way to make IM use the full image, instead of the embedded thumbnail?
My guess is that IM isn't recognising your DNG as a DNG, but thinks it is a TIFF. What is the output from "-verbose"? In addition, "-debug all" may say if IM is trying to use an internal or external delegate.
ravengangrel wrote:2) Is there some way to change the white balance used by mogrify, short of recompiling without libraw?
With an external delegate, eg dcraw, we can change the command used in delegates.xml. I would hope we have similar flexibility with libraw, but I fear we don't.
ravengangrel wrote:3) Is there some kind of guide to windows compilation?
See my pages, especially Compiling IM with Cygwin. Once Cygwin is installed and IM source is downloaded, it is just 5 commands.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 22653
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Latest IM ignores delegates?

Post by fmw42 » 2018-02-10T11:46:17-07:00

ufraw does have white balance and other controls. See https://www.freebsd.org/cgi/man.cgi?que ... .0-RELEASE

Post Reply