Imagemagick cannot process DNG (dng.la file not found)

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?".
Post Reply
starfry
Posts: 11
Joined: 2015-07-18T16:47:36-07:00
Authentication code: 1151

Imagemagick cannot process DNG (dng.la file not found)

Post by starfry »

I have this makefile that converts images. I have not used it for a while but now I try and get an error that I can reproduce as follows

Code: Select all

$ identify dng:image.dng
identify: unable to open image 'dng:image.dng': No such file or directory @ error/blob.c/OpenBlob/3357.
identify: unable to load module '/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la': file not found @ error/module.c/OpenModule/1275.
identify: no decode delegate for this image format `DNG' @ error/constitute.c/ReadImage/509.
I have checked and the file is present

Code: Select all

$ ls -l /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng*
-rwxr-xr-x 1 root root  1111 Feb 19 07:54 /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la
-rwxr-xr-x 1 root root 15200 Feb 19 07:55 /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.so
I am using Arch Linux. I have checked and confirmed packages are up to date:

Code: Select all

$ pacman -Qo convert ufraw dcraw
/usr/bin/convert is owned by imagemagick 7.0.7.23-1
/usr/bin/ufraw is owned by gimp-ufraw 0.22-11
/usr/bin/dcraw is owned by dcraw 9.27.0-1
My system was last updated yesterday. Any ideas what may be causing this?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by Bonzo »

Looks like you are now using version 7 and the convert command has changed to magick.

Also I think identify now needs to be:

Code: Select all

$ magick identify dng:image.dng
May not be your problem but something to bear in mind
starfry
Posts: 11
Joined: 2015-07-18T16:47:36-07:00
Authentication code: 1151

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by starfry »

Well I never knew that :lol:

But I do get the same problem with "identify" and "magick identify". I also tried with version 6 and also had the same problem. FWIW I didn't intentionally update to v7 but with Arch, being "bleeding edge", that's what happened :)

Code: Select all

$ identify dng:image.dng
identify: unable to open image `dng:image.dng': No such file or directory @ error/blob.c/OpenBlob/2761.
identify: unable to load module `/usr/lib/ImageMagick-6.9.9/modules-Q16HDRI/coders/dng.la': file not found @ error/module.c/OpenModule/1303.
identify: no decode delegate for this image format `DNG' @ error/constitute.c/ReadImage/504.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by snibgo »

Did you build IM yourself? If so, what does config.log say about the build? In particular, what does it say about libraw?
snibgo's IM pages: im.snibgo.com
starfry
Posts: 11
Joined: 2015-07-18T16:47:36-07:00
Authentication code: 1151

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by starfry »

No, I installed the Arch Linux package.

Code: Select all

$ pacman -S imagemagick
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by Bonzo »

Arch, being "bleeding edge", that's what happened :)
That's a surprise as a lot of Linux distros are still on 6.7 and in some cases 6.5 although they are usually patched.
starfry
Posts: 11
Joined: 2015-07-18T16:47:36-07:00
Authentication code: 1151

Re: Imagemagick cannot process DNG (dng.la file not found)

Post by starfry »

I've been trying to get to the bottom of this unsuccessfully.

I have checked my delegates.xml file:

Code: Select all

$ grep dng /etc/ImageMagick-7/delegates.xml
  <delegate decode="dng:decode" command="&quot;ufraw-batch&quot; --silent --create-id=also --out-type=png --out-depth=16 &quot;--output=%u.png&quot; &quot;%i&quot;"/>
I have manually executed the command-line configured in the delegate:

Code: Select all

ufraw-batch --silent --create-id=also --out-type=png --out-depth=16 --output=temp.png raw_test_16.dng
and I can identify the resultant png:

Code: Select all

$ identify temp.png
temp.png PNG 5084x3848 5084x3848+0+0 16-bit sRGB 95.4144MiB 0.000u 0:00.000
So, from what I can see, the dependencies are in place but use through my imagemagick fails.

Code: Select all

identify dng:raw_test_16.dng
identify: unable to open image 'dng:raw_test_16.dng': No such file or directory @ error/blob.c/OpenBlob/3357.
identify: unable to load module '/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la': file not found @ error/module.c/OpenModule/1275.
identify: no decode delegate for this image format `DNG' @ error/constitute.c/ReadImage/509.
The debug output shows likes like these:

Code: Select all

2018-02-26T11:04:05+00:00 0:00.010 0.000u 7.0.7 Module identify[8783]: module.c/OpenModule/1261/Module Searching for module "DNG" using filename "dng.la"
2018-02-26T11:04:05+00:00 0:00.010 0.000u 7.0.7 Module identify[8783]: module.c/GetMagickModulePath/546/Module Searching for coder module file "dng.la" ...
2018-02-26T11:04:05+00:00 0:00.010 0.000u 7.0.7 Module identify[8783]: module.c/OpenModule/1270/Module Opening module at path "/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la"
2018-02-26T11:04:05+00:00 0:00.020 0.000u 7.0.7 Exception identify[8783]: module.c/OpenModule/1275/Exception unable to load module '/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la': file not found
2018-02-26T11:04:05+00:00 0:00.020 0.000u 7.0.7 Module identify[8783]: module.c/OpenModule/1261/Module Searching for module "DNG" using filename "dng.la"
2018-02-26T11:04:05+00:00 0:00.020 0.000u 7.0.7 Module identify[8783]: module.c/GetMagickModulePath/546/Module Searching for coder module file "dng.la" ...
2018-02-26T11:04:05+00:00 0:00.020 0.000u 7.0.7 Module identify[8783]: module.c/OpenModule/1270/Module Opening module at path "/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la"
2018-02-26T11:04:05+00:00 0:00.020 0.000u 7.0.7 Exception identify[8783]: module.c/OpenModule/1275/Exception unable to load module '/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la': file not found
The file definitely exists:

Code: Select all

$ ls -l /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.*
-rwxr-xr-x 1 root root  1111 Feb 19 07:54 /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la
-rwxr-xr-x 1 root root 15200 Feb 19 07:55 /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.so
$ file /usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la
/usr/lib/ImageMagick-7.0.7/modules-Q16HDRI/coders/dng.la: libtool library file, ASCII text
I tested again and see the same results with versions 6 and 7 of ImageMagick.
Post Reply