8
{ Error: Command failed: identify: delegate failed `'ufraw-batch' --silent --create-id=also --out-type=png --out-depth=16 '--output=%u.png' '%i'' @ error/delegate.c/InvokeDelegate/1919.
identify: unable to open image `/tmp/magick-53080Z_JGYvtuPOl8.ppm': No such file or directory @ error/blob.c/OpenBlob/2841.

I got an issue while working with ImageMagick in my node application I did the search but can't get the proper solution for my problem.

Mohammad Zeeshan
  • 825
  • 1
  • 9
  • 20

2 Answers2

9

Edit: ufraw is no longer maintained, so use at your own risk and see dcraw alternative lower down.

You need to install 'ufraw-batch'

sudo apt-get install ufraw-batch

If this does not work, as it did for me. I got a "Segmentation fault (core dumped)" This seems to be common problem with ufraw: https://sourceforge.net/p/ufraw/bugs/ It does not seem to get update much anymore, at least not in the main repos.

Converting RAW image into other types of image you can use DCRaw (it is also used by UFRaw). Here is an example to convert a .cr2 image to a .png:

dcraw -c -w "./IMG_1.CR2" | pnmtopng > "./IMG_1.png";
Ralph Bisschops
  • 1,888
  • 1
  • 22
  • 34
  • how to convert it to jpg? – John Balvin Arias Sep 29 '19 at 02:40
  • There is also `pnmtojpeg` command if you want them as jpg files. (there are also others if you want to) you can also use the `convert` command to change filetype. – Ralph Bisschops Sep 30 '19 at 13:28
  • 3
    Thanks this actually worked for me on OS Catalina with ImageMagic 7.0.10. For mac use `brew install ufraw`. – homiak Sep 29 '20 at 19:34
  • Ubuntu users: UFRAW is apparently no longer maintained https://en.wikipedia.org/wiki/UFRaw so it shouldn't be installed, and it's also not available on Ubuntu 20 and up unfortunately. – Raleigh L. Oct 03 '22 at 04:28
  • Added a note to the answer for the unmaintained tool. – Ralph Bisschops Oct 12 '22 at 15:13
  • The `dcraw` command didn't work for me when attempting to convert DNG files to JPG (I replaced `pnmtopng` with `pnmtojpeg`). It seemed to mess up the colorspace (?) and caused images to come out in black-and-white. – Raleigh L. Dec 05 '22 at 19:40
  • `dcraw` has some color options. Maybe you are using a special color-space it does not support? Colors are usually differently encoded in raw formats to allow more flexibility with color-grading afterwords. https://www.dechifro.org/dcraw/dcraw.1.html#lbAG – Ralph Bisschops Dec 05 '22 at 21:38
1

Macos:

brew install ufraw

Solved it for me

Lamellama
  • 621
  • 6
  • 4