DNG Delegate Fails When Statically Linking
Posted: 2014-09-08T16:14:14-07:00
So my current setup is IM 6.8.9-5 compiled to a .a static archive file which is linked against Go -> C Bindings (https://github.com/gographics/imagick). I noticed that delegate.c contained the mapping for delegates, and I changed:
to
per running into this bug: https://bugs.launchpad.net/ubuntu/+sour ... bug/371791
I also tried changing it to output PNG, based on the code I had read in coders/dng.c (it seems to try to read a .ppm file and then falls back to a png if it couldn't find one):
The result of changing this line in delegate.c is that I no longer get an error saying IM couldn't find the pnm file. However, now I am able to read an image blob that represents a CR2 into a wand, but when I try to do MagickGetImageBlob, an array of length 0 is returned. Furthermore, what's weird is that the image itself is about 6.3MB, but it comes out to be about 32MB when it's read into the wand. Any ideas?
Code: Select all
" <delegate decode=\"dng:decode\" command=\""/usr/bin/ufraw-batch" --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=ppm16 "--output=%u.pnm" "%i"\"/>"
Code: Select all
" <delegate decode=\"dng:decode\" command=\""ufraw-batch" --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=ppm --out-depth=16 "--output=%u.ppm" "%i"\"/>"
I also tried changing it to output PNG, based on the code I had read in coders/dng.c (it seems to try to read a .ppm file and then falls back to a png if it couldn't find one):
Code: Select all
" <delegate decode=\"dng:decode\" command=\""ufraw-batch" --silent --wb=camera --black-point=auto --exposure=auto --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i"\"/>"