Help with DCRaw Delegate Configuration
Posted: 2015-11-07T01:39:38-07:00
Hi. I've spent about 5 days working on this without being able to get over the final hump and so I'm finally turning to the community.
Basically I have decided to change the ufraw-batch process to use dcraw instead. I've installed dcraw and cjpeg so that I can convert raw files (specifically .CR2 files in my case) to JPGs. I am running on a CentOS box using ImageMagick 6.7.8-9.
If I run the following from the command line, my system will successfully convert a CR2 file into a JPG:
So basically dcraw processes the CR2 file to STDOUT. STDOUT then pipes that into the cjpeg program which converts it into a jpeg. Unfortunately I cannot for the life of me configure the delegate in the delegates.xml file and was hoping someone could shed some light on it. Here's what I've tried:
Which as far as I can tell should run the dcraw command on the input file, process it the same way and then pipe the output to cjpeg which should in turn write it to the output file name. Unfortunately that does not happen.
The weirdest part is that the IMG_1830.CR2 file that was in the directory when I started will no longer be in the directory after I run this command and it fails. It also doesn't seem that those temp magick files are ever created in the /tmp/ directory. So I really haven't a clue what is going on at this point, but would love to solve this.
I've also taken the time to type up a step-by-step on how to get dcraw going on one's system, but I'd love to solve this final step!
Basically I have decided to change the ufraw-batch process to use dcraw instead. I've installed dcraw and cjpeg so that I can convert raw files (specifically .CR2 files in my case) to JPGs. I am running on a CentOS box using ImageMagick 6.7.8-9.
If I run the following from the command line, my system will successfully convert a CR2 file into a JPG:
Code: Select all
dcraw -c -q 3 -H 5 -w IMG_1830.CR2 | /opt/libjpeg-turbo/bin/cjpeg -quality 100 > IMG_1830.jpg
Code: Select all
<delegate decode="dng:decode" command=""dcraw" -c -q 3 -H 5 -w "%i" | "/opt/libjpeg-turbo/bin/cjpeg" -quality 100 > "%o""/>
Code: Select all
dev01::~/dcraw/#>convert -verbose IMG_1830.CR2 IMG.JPG
"dcraw" -c -q 3 -H 5 -w "/tmp/magick-VteWODb6" | "/opt/libjpeg-turbo/bin/cjpeg" -quality 100 > "/tmp/magick-7gqEr1sV"
Cannot decode file /tmp/magick-VteWODb6
Empty input file
convert: delegate failed `"dcraw" -c -q 3 -H 5 -w "%u" | "/opt/libjpeg-turbo/bin/cjpeg" -quality 100 > "%o"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/tmp/magick-VteWODb6.ppm': No such file or directory @ error/blob.c/OpenBlob/2642.
convert: no images defined `IMG.JPG' @ error/convert.c/ConvertImageCommand/3046.
I've also taken the time to type up a step-by-step on how to get dcraw going on one's system, but I'd love to solve this final step!