"delegated" raw images broken in 6.3.5-9

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

"delegated" raw images broken in 6.3.5-9

Post by mi »

This used to work with 6.3.5-5. It is broken now with 6.3.5-9:

Code: Select all

convert DSC_2045.NEF DSC_2045.jpg
convert: unable to open image `/var/tmp/magick-DIuu3TqX.pnm': No such file or directory.
convert: missing an image filename `DSC_2045.jpg'.
ufraw-batch -- the executable, to which ImageMagick delegates Nikon's "raw" files -- has not changed on this system.

When invoked directly, the executable creates the file as expected:

Code: Select all

% /opt/bin/ufraw-batch --silent --wb=camera --black-point=auto --exposure=auto --out-type=ppm16 --output=DSC_2045.pnm DSC_2045.NEF
% file DSC_2045.pnm
DSC_2045.pnm: Netpbm PPM "rawbits" image data
% identify DSC_2045.pnm
DSC_2045.pnm PNM 3039x2014 3039x2014+0+0 DirectClass 16-bit 35.0221mb 0.305u 0:02
Please, advise.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: "delegated" raw images broken in 6.3.5-9

Post by mi »

With the following trick, I can see, that the filenames that ufraw-batch is instructed to create and what ImageMagick then expects are, somehow, different:

Code: Select all

% convert DSC_2045.NEF DSC_2045.jpg & (sleep 0.2; ps -axww | grep ufraw)
[1] 8496
 8499  p7  R      0:00,08 /opt/bin/ufraw-batch --silent --wb=camera --black-point=auto --exposure=auto --out-type=ppm16 --output="/var/tmp/magick-ZpohUMj5" /var/tmp/magick-VSCtpJDi
% convert: unable to open image `/var/tmp/magick-MaplldvJ.pnm': No such file or directory.
convert: missing an image filename `DSC_2045.jpg'.
While we are at this, why does IM bother to create the temporary files at all (even if only as symlinks to the originals), instead of directing a delegate to the original (when available)?
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: "delegated" raw images broken in 6.3.5-9

Post by mi »

More specifically, the `-debug all' (what else can be specified other than "all"?) looks like:

Code: Select all

% convert -debug all DSC_2045.NEF DSC_2045.jpg
]: utility.c/unknown/805/Configure
  Command line: convert {-debug} {all} {DSC_2045.NEF} {DSC_2045.jpg}
 0.000u 6.3.5 Blob convert[8591]: blob.c/unknown/2320/Blob
    read 4096 magic header bytes
iijjkkkk ... BINARY JUNK ....
/unknown/482/Configure-АР=LcB╙Tfd; ╠к|ДiKЦ-d╒,0@єНfRCztaPГ!РEп|_Б[kVOMey/ЛXзЄ
  Searching for configure file: "/opt/lib/ImageMagick/config/delegates.xml"
/unknown/482/Configure
  Searching for configure file: "/opt/share/ImageMagick/config/delegates.xml"
/unknown/482/Configure
  Searching for configure file: "/opt/share/doc/ImageMagick-6.3.5/delegates.xml"
/unknown/482/Configure
  Searching for configure file: "/opt/share/doc/ImageMagick-6.3.5/delegates.xml"/unknown/482/Configure
  Searching for configure file: "/opt/share/ImageMagick-6.3.5/delegates.xml"
8591]: configure.c/unknown/482/Configure
  Searching for configure file: "/home/mi/.magick/delegates.xml"
8591]: configure.c/unknown/482/Configure
  Searching for configure file: "/home/mi/.magick/delegates.xml" convert[8591]: configure.c/unknown/482/Configure
  Searching for configure file: "delegates.xml"
 delegate.c/unknown/1165/Configure
  Loading delegate map "/opt/lib/ImageMagick/config/delegates.xml" ...
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/418/Resource
  /var/tmp/magick-u72aNDH2
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-u72aNDH2
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/418/Resource
  /var/tmp/magick-YSHDtJ69
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/418/Resource
  /var/tmp/magick-sJ5SDxcp
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/418/Resource
  /var/tmp/magick-mJJFekYE
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-mJJFekYE
^[[?1;2c^[[?1;2c^[[?1;2c^[[?1;2c^[[?1;2c^[[?1;2c--silent 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-mJJFekYE
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-YSHDtJ69
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-sJ5SDxcp
 0:01 0.016u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-u72aNDH2
 0:01 0.016u 6.3.5 Cache convert[8591]: cache.c/unknown/2161/Cache
  destroy 
/unknown/498/Locale
  Searching for locale file: "/opt/lib/ImageMagick/config/locale.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/ImageMagick/config/locale.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/doc/ImageMagick-6.3.5/locale.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/doc/ImageMagick-6.3.5/locale.xml"/unknown/498/Locale
  Searching for locale file: "/opt/share/ImageMagick-6.3.5/locale.xml"
[8591]: locale.c/unknown/498/Locale
  Searching for locale file: "/home/mi/.magick/locale.xml"
[8591]: locale.c/unknown/498/Locale
  Searching for locale file: "/home/mi/.magick/locale.xml" Locale convert[8591]: locale.c/unknown/498/Locale
  Searching for locale file: "locale.xml"
]: locale.c/unknown/832/Configure
  Loading locale map "/opt/lib/ImageMagick/config/locale.xml" ...
/unknown/498/Locale
  Searching for locale file: "/opt/lib/ImageMagick/config/english.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/ImageMagick/config/english.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/doc/ImageMagick-6.3.5/english.xml"
/unknown/498/Locale
  Searching for locale file: "/opt/share/ImageMagick-6.3.5/english.xml"
[8591]: locale.c/unknown/498/Locale
  Searching for locale file: "/home/mi/.magick/english.xml"
 Locale convert[8591]: locale.c/unknown/498/Locale
  Searching for locale file: "english.xml"
]: locale.c/unknown/832/Configure
  Loading locale map "/opt/lib/ImageMagick/config/english.xml" ...
/Exception
  unable to open image `/var/tmp/magick-YSHDtJ69.pnm': No such file or directory
/Exception
  unable to open image `/var/tmp/magick-YSHDtJ69.pnm': No such file or directory 0:01 0.031u 6.3.5 Cache convert[8591]: cache.c/unknown/2161/Cache
  destroy 
/2390/Exception
  unable to open image `/var/tmp/magick-YSHDtJ69.pnm': No such file or directory
 0:01 0.031u 6.3.5 Cache convert[8591]: cache.c/unknown/2161/Cache
  destroy 
 0.031u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-YSHDtJ69.pnm
 0.031u 6.3.5 Resource convert[8591]: resource.c/unknown/859/Resource
  /var/tmp/magick-YSHDtJ69.pnm Exception convert[8591]: convert.c/unknown/2611/Exception
  missing an image filename `DSC_2045.jpg'
convert: unable to open image `/var/tmp/magick-YSHDtJ69.pnm': No such file or directory.
convert: missing an image filename `DSC_2045.jpg'.
Hope, this helps.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: "delegated" raw images broken in 6.3.5-9

Post by magick »

To fix the problem you reported, change --output="%u.ppm" to --output=%u.ppm for the DNG tag of config/delegates.xml. Some programs strip the quotes of a filename (e.g. gs), however, ufraw-batch does not. We are going to incorporate this patch and a few others in the 6.3.5-10 release on September 23.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: "delegated" raw images broken in 6.3.5-9

Post by mi »

We are going to incorporate this patch and a few others in the 6.3.5-10 release on September 23.
Although I'm glad, the 6.3.5-10 was released two days earlier, the config/delegates.xml.in in it still needs patching to remove quotes around %u.ppm.

Release control?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: "delegated" raw images broken in 6.3.5-9

Post by magick »

Not sure what you are talking about. We tried
  • convert -verbose DJC_D2X_DOF_0008.nef DJC_D2X_DOF_0008.png
and it returned without complaint and returned the expected image in the PNG format. Did the conversion fail for you? Our delegate file says "--output=%u.pnm". You mentioned %u.ppm which we cannot locate in the delegates.xml.in configuration file.

> Release control?

As always the release was tested on 7 different operating systems and passed the 1000+ included regression tests plus at least 1000 more that are not part of the ImageMagick distribution package including the ones we run when we generate the Usage site at http://www.imagemagick.org/Usage/. If you have a use case that fails we would happy to include it as a regression test for the next release cycle.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: "delegated" raw images broken in 6.3.5-9

Post by mi »

You are right -- somehow my patch applied successfully, even though it should've failed, because the fix is already in there...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: "delegated" raw images broken in 6.3.5-9

Post by magick »

See viewtopic.php?f=4&t=9767 to fix a memory leak in ImageMagick 6.3.5-9. ImageMagick 6.3.6-0 will be released shortly to address the memory leak.
Post Reply