Latest IM ignores delegates?
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Latest IM ignores delegates?
Hello,
I'm trying to convert some DNG files to JPG, but they appear with a yellowish tone.
Trying manually my custom delegate (a call to ufraw-batch in windows) and then converting the generated png to jpg with convert, everything works right.
Finally, I have removed ufraw-batch.exe from the path, but the conversion still works, even trying to force the delegate prepending "dng:" before the source file name. It's like the delegates.xml file is being ignored. Is that possible?
Is there something I can do?
Thank you very much.
I'm trying to convert some DNG files to JPG, but they appear with a yellowish tone.
Trying manually my custom delegate (a call to ufraw-batch in windows) and then converting the generated png to jpg with convert, everything works right.
Finally, I have removed ufraw-batch.exe from the path, but the conversion still works, even trying to force the delegate prepending "dng:" before the source file name. It's like the delegates.xml file is being ignored. Is that possible?
Is there something I can do?
Thank you very much.
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Re: Latest IM ignores delegates?
And with "delegates" I mean the old delegates.xml file. Is it still used?
I have found that removing IM_MOD_RL_dng_.dll from modules/coders it doesn't work, but still doesn't use the old delegates.xml
I have found that removing IM_MOD_RL_dng_.dll from modules/coders it doesn't work, but still doesn't use the old delegates.xml
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
What is your IM version? I presume you are on Windows from your comments. What was your exact command line and how and where did you modify the delegates.xml file? Can you post your input and output images so we can test with them? Please explain what is wrong with the output you post.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Re: Latest IM ignores delegates?
Thank you very much.
I have just downloaded and installed the latest, 7.0.7-22-x64-Q16-HDRI.
Changes in the delegates file:
<!-- delegate decode="dng:decode" stealth="True" command="dcraw.exe -6 -W -O "%u.ppm" "%i""/ -->
<delegate decode="dng:decode" command=""ufraw-batch.exe" --silent --wb=auto --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
(The first line was commented, and the second one added, copied from an IM6 linux installation).
My commandline:
>magick mogrify -verbose -format jpg dng:IMG_0851.DNG
dng:IMG_0851.DNG=>IMG_0851.DNG DNG 5488x3664 5504x3664+2+0 16-bit sRGB 18.5213MiB 8.469u 0:02.626
dng:IMG_0851.DNG=>IMG_0851.jpg DNG 5488x3664 5504x3664+2+0 16-bit sRGB 7.30335MiB 0.828u 0:00.863
>ufraw-batch --wb=auto --out-type=png --out-depth=16 IMG_0851.dng
ufraw-batch: Loaded IMG_0851.dng
ufraw-batch: Saved G:\fotos\2017\2017-12-05 (prueba FN)\IMG_0851.png
>magick convert IMG_0851.png IMG_0851_from_ufraw.jpg
I hope these thumbnails will be enough to understand my problem. The IMG_0851.jpg image is too yellow.
I have just downloaded and installed the latest, 7.0.7-22-x64-Q16-HDRI.
Changes in the delegates file:
<!-- delegate decode="dng:decode" stealth="True" command="dcraw.exe -6 -W -O "%u.ppm" "%i""/ -->
<delegate decode="dng:decode" command=""ufraw-batch.exe" --silent --wb=auto --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
(The first line was commented, and the second one added, copied from an IM6 linux installation).
My commandline:
>magick mogrify -verbose -format jpg dng:IMG_0851.DNG
dng:IMG_0851.DNG=>IMG_0851.DNG DNG 5488x3664 5504x3664+2+0 16-bit sRGB 18.5213MiB 8.469u 0:02.626
dng:IMG_0851.DNG=>IMG_0851.jpg DNG 5488x3664 5504x3664+2+0 16-bit sRGB 7.30335MiB 0.828u 0:00.863
>ufraw-batch --wb=auto --out-type=png --out-depth=16 IMG_0851.dng
ufraw-batch: Loaded IMG_0851.dng
ufraw-batch: Saved G:\fotos\2017\2017-12-05 (prueba FN)\IMG_0851.png
>magick convert IMG_0851.png IMG_0851_from_ufraw.jpg
I hope these thumbnails will be enough to understand my problem. The IMG_0851.jpg image is too yellow.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
Please post your DNG file as a separate file, so we can test it. You may want to zip it to prevent any changes.
I am still now sure I understand. Which delegate file (using dcraw or ufraw-batch) and IM version gave the wrong coloring and what was your command and IM version that gave the yellow output and what was the command and IM version that gave the better output. In which directory did you change the delegates.xml file? See https://www.imagemagick.org/script/resources.php for the order in which folders are searched for the changed delegates.xml file.
I am getting confused about why you are comparing mogrify with convert. Is one or the other not working.
I am still now sure I understand. Which delegate file (using dcraw or ufraw-batch) and IM version gave the wrong coloring and what was your command and IM version that gave the yellow output and what was the command and IM version that gave the better output. In which directory did you change the delegates.xml file? See https://www.imagemagick.org/script/resources.php for the order in which folders are searched for the changed delegates.xml file.
I am getting confused about why you are comparing mogrify with convert. Is one or the other not working.
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Re: Latest IM ignores delegates?
Sorry, I thought they were equivalent. Convert does a better job. I don't have time right now, but I'll get to it ASAP and I'll give more info.
Thank you very much!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Latest IM ignores delegates?
See http://www.imagemagick.org/discourse-se ... aw#p153488 , the announcement that recent releases of IM would use the libraw delegate library. I assume this means that raw files will be processed by internal delegates, rather than external delegates, via delegates.xml.
A colour cast suggests an incorrect white balance is being used.
A colour cast suggests an incorrect white balance is being used.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
It seems odd to me that mogrify would not give the same results as magick. But you are using "magick convert" which I think is then using IM 6 or at least is not exactly the same as just magick. You should use magick in place of convert, rather than magick convert. But for the other functions such as identify and mogrify and montage, you need to preface them with magick. But magick mogrify is still using the old IM 6 mogrify.
Perhaps mogrify is not accessing the same delegate as with convert. I really do not know the software that well. Snibgo is more an expert on that than I.
I would suggest you post your DNG file, so we can test with it.
Perhaps mogrify is not accessing the same delegate as with convert. I really do not know the software that well. Snibgo is more an expert on that than I.
I would suggest you post your DNG file, so we can test with it.
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Re: Latest IM ignores delegates?
Here is the zipped DNG:
https://wetransfer.com/downloads/2aa735 ... 435/68face
It will be available for a week I think.
Feel free to do with it whatever you want or need.
Is it not possible anymore to use external delegates for formats with internal support?
https://wetransfer.com/downloads/2aa735 ... 435/68face
It will be available for a week I think.
Feel free to do with it whatever you want or need.
That was my first thought. Is it possible to adjust it via CLI for an internal delegate?
Is it not possible anymore to use external delegates for formats with internal support?
-
- Posts: 9
- Joined: 2018-02-08T14:05:15-07:00
- Authentication code: 1152
Re: Latest IM ignores delegates?
magick generates the same file -bit by bit- as magick convert, by the way. A really small file (3.57 kb), I think it's using the internal thumbnail.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
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.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Latest IM ignores delegates?
Sorry, with my pathetic internet connection I can't download your zipped dng.
You can add an entry to delegates.xml with your own invented prefix, eg "mydng". Then use that prefix (with a colon) as input file to IM. The delegates.xml entry can call dcraw or ufraw-batch or whatever you want.ravengangrel wrote:Is it possible to adjust it via CLI for an internal delegate?
Code: Select all
magick mydng:abc.dng out.tiff
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
I am not as knowledgeable as snibgo about delegates, but can you not just modify the dng:decode entry to use whatever tool (dcraw, etc) and parameters to make it do what you want?
Code: Select all
<delegate decode="dng:decode" command=""ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Latest IM ignores delegates?
It seems that recent IM doesn't use delegates.xml for DNG files, so modifying the DNG entry will have no effect.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Latest IM ignores delegates?
For my benefit, how do you know it does not use that delegate?