Need Help Urgently: Convert CR2 to png
Need Help Urgently: Convert CR2 to png
Hi All,
I have an urgent requirement to convert CR2 file to PNG. I have installed ImageMagick and Libraw command line tool on my linux server (application scope installation as i don't have root privilege).
Installed ImageMagick and Libraw at : /ngs/app/acto/usr/ --> which has all bin, lib and include files present in folders.
After installing libraw, i have changed my delegate.xml as below:
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i" mv -f `basename "%o.ppm"` "%o""/>
and when i am trying to run below command :
/ngs/app/acto/usr/bin/convert dcraw8:Scout.CR2 Scout.png
i am getting error message as below:
Processing file /tmp/magick-18357-HDHHBvK1Wr6
Writing file /tmp/magick-18357-HDHHBvK1Wr6.ppm
Processing file mv
Cannot open_file mv: Input/output error
Processing file `basename
Cannot open_file `basename: Input/output error
Processing file /tmp/magick-18357Zyc_p8rfyraU.ppm
Cannot open_file /tmp/magick-18357Zyc_p8rfyraU.ppm: Input/output error
Processing file /tmp/magick-18357Zyc_p8rfyraU
Cannot open_file /tmp/magick-18357Zyc_p8rfyraU: Unsupported file format or not RAW file
convert: unable to open image `/tmp/magick-18357v62v3LlFcD4P': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-18357v62v3LlFcD4P': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
Please help.
I have an urgent requirement to convert CR2 file to PNG. I have installed ImageMagick and Libraw command line tool on my linux server (application scope installation as i don't have root privilege).
Installed ImageMagick and Libraw at : /ngs/app/acto/usr/ --> which has all bin, lib and include files present in folders.
After installing libraw, i have changed my delegate.xml as below:
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i" mv -f `basename "%o.ppm"` "%o""/>
and when i am trying to run below command :
/ngs/app/acto/usr/bin/convert dcraw8:Scout.CR2 Scout.png
i am getting error message as below:
Processing file /tmp/magick-18357-HDHHBvK1Wr6
Writing file /tmp/magick-18357-HDHHBvK1Wr6.ppm
Processing file mv
Cannot open_file mv: Input/output error
Processing file `basename
Cannot open_file `basename: Input/output error
Processing file /tmp/magick-18357Zyc_p8rfyraU.ppm
Cannot open_file /tmp/magick-18357Zyc_p8rfyraU.ppm: Input/output error
Processing file /tmp/magick-18357Zyc_p8rfyraU
Cannot open_file /tmp/magick-18357Zyc_p8rfyraU: Unsupported file format or not RAW file
convert: unable to open image `/tmp/magick-18357v62v3LlFcD4P': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-18357v62v3LlFcD4P': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
Please help.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Need Help Urgently: Convert CR2 to png
I do not know much about DCRAW and CR2 images, but it might help to identify your IM version, platform and provide the input CR2 image.
Re: Need Help Urgently: Convert CR2 to png
It looks like you are missing a semicolon:
-w "%i"
Should be:
-w "%i" ;
-w "%i"
Should be:
-w "%i" ;
Re: Need Help Urgently: Convert CR2 to png
Thanks for quick response. Please find below detail as required
Version : ImageMagick 6.8.6-10 2013-10-05 Q16
Linux Version : Linux version 2.6.32-300.11.1.el5uek (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50))
I updated the delegate.xml with semicolon and now getting below error :
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%o.ppm"` "%o""/>
Error :
Processing file /tmp/magick-24470T_38BEehnxcK
Writing file /tmp/magick-24470T_38BEehnxcK.ppm
Cannot write /tmp/magick-24470T_38BEehnxcK.ppm: Unknown error code
mv: cannot stat `magick-24470ZHZkYpFX47B4.ppm': No such file or directory
convert: delegate failed `/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%o.ppm"` "%o"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/tmp/magick-244700X5yYdbaLl5v': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-244700X5yYdbaLl5v': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
Version : ImageMagick 6.8.6-10 2013-10-05 Q16
Linux Version : Linux version 2.6.32-300.11.1.el5uek (mockbuild@ca-build56.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50))
I updated the delegate.xml with semicolon and now getting below error :
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%o.ppm"` "%o""/>
Error :
Processing file /tmp/magick-24470T_38BEehnxcK
Writing file /tmp/magick-24470T_38BEehnxcK.ppm
Cannot write /tmp/magick-24470T_38BEehnxcK.ppm: Unknown error code
mv: cannot stat `magick-24470ZHZkYpFX47B4.ppm': No such file or directory
convert: delegate failed `/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%o.ppm"` "%o"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/tmp/magick-244700X5yYdbaLl5v': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-244700X5yYdbaLl5v': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
Re: Need Help Urgently: Convert CR2 to png
Do you have access to /tmp ? You should also change 'basename "%o.ppm"' to 'basename "%i.ppm"'.
Re: Need Help Urgently: Convert CR2 to png
yes i have access to /tmp folder...i just tried moving a file from tmp to other location and i was able to do that.
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o""/>
-bash-3.2$ /ngs/app/acto/usr/bin/convert dcraw8:Scout.CR2 Scout.png
Processing file /tmp/magick-26380emVW0SS6VLbX
Writing file /tmp/magick-26380emVW0SS6VLbX.ppm
mv: cannot stat `magick-26380emVW0SS6VLbX.ppm.': No such file or directory
convert: delegate failed `/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/tmp/magick-26380_ZseaaKE9nlE': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-26380_ZseaaKE9nlE': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o""/>
-bash-3.2$ /ngs/app/acto/usr/bin/convert dcraw8:Scout.CR2 Scout.png
Processing file /tmp/magick-26380emVW0SS6VLbX
Writing file /tmp/magick-26380emVW0SS6VLbX.ppm
mv: cannot stat `magick-26380emVW0SS6VLbX.ppm.': No such file or directory
convert: delegate failed `/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/tmp/magick-26380_ZseaaKE9nlE': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/tmp/magick-26380_ZseaaKE9nlE': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `Scout.png' @ error/convert.c/ConvertImageCommand/3127.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Need Help Urgently: Convert CR2 to png
might it be that you do not have write permission from IM to /tmp?
Re: Need Help Urgently: Convert CR2 to png
Out of interest did you try converting a CR2 file before making any changes to your setup?
I am able to convert CR2 files with the standard installation.
Have you tried converting any other file formats?
I am able to convert CR2 files with the standard installation.
Have you tried converting any other file formats?
Re: Need Help Urgently: Convert CR2 to png
I am setting this up first time on my development server and unfortunately i don't have root privilege therefore installed Imagemagick and libraw in application scope.
Can you please verify below :
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o""/>
Red color command is converting file into ppm at /tmp location (which i can see)
Blue color command is moving/converting ppm file to output (png format)
I dont think there should be 'dot' in between and second once after converting file to ppm, i am trying to move/convert ppm file from my current directory (where actually its not present). Can any one tell me how this command works
Can you please verify below :
<delegate decode="dcraw8" command="/ngs/app/acto/usr/bin/simple_dcraw -v -w "%i"; mv -f `basename "%i.ppm"`. "%o""/>
Red color command is converting file into ppm at /tmp location (which i can see)
Blue color command is moving/converting ppm file to output (png format)
I dont think there should be 'dot' in between and second once after converting file to ppm, i am trying to move/convert ppm file from my current directory (where actually its not present). Can any one tell me how this command works
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Need Help Urgently: Convert CR2 to png
Probably not relevant, but shouldn't there be a space on both sides of the ";"?
snibgo's IM pages: im.snibgo.com
Re: Need Help Urgently: Convert CR2 to png
I just setup same code to different machine with root access :
I have ImagMagick and dcraw installed there as root. Shouldn't be this working now :
<delegate decode="dcraw8" command="/opt/local/bin/dcraw -v -w "%i" ; "%o.png""/>
Error message :
sh-3.2# convert dcraw8:test.CR2 image
Loading Canon EOS 5D Mark III image from /var/tmp/magick-12683gCU23Uu2NB2e ...
Scaling with darkness 2046, saturation 15488, and
multipliers 1.965820 1.000000 1.741211 1.000000
AHD interpolation...
Converting to sRGB colorspace...
Writing data to /var/tmp/magick-12683gCU23Uu2NB2e.ppm ...
sh: /var/tmp/magick-12683kDPsq4US1sDm.png: No such file or directory
convert: delegate failed `/opt/local/bin/dcraw -v -w "%i" ; "%o.png"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/var/tmp/magick-12683SXcX5DibG4GB': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/var/tmp/magick-12683SXcX5DibG4GB': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `image' @ error/convert.c/ConvertImageCommand/3108.
I have ImagMagick and dcraw installed there as root. Shouldn't be this working now :
<delegate decode="dcraw8" command="/opt/local/bin/dcraw -v -w "%i" ; "%o.png""/>
Error message :
sh-3.2# convert dcraw8:test.CR2 image
Loading Canon EOS 5D Mark III image from /var/tmp/magick-12683gCU23Uu2NB2e ...
Scaling with darkness 2046, saturation 15488, and
multipliers 1.965820 1.000000 1.741211 1.000000
AHD interpolation...
Converting to sRGB colorspace...
Writing data to /var/tmp/magick-12683gCU23Uu2NB2e.ppm ...
sh: /var/tmp/magick-12683kDPsq4US1sDm.png: No such file or directory
convert: delegate failed `/opt/local/bin/dcraw -v -w "%i" ; "%o.png"' @ error/delegate.c/InvokeDelegate/1065.
convert: unable to open image `/var/tmp/magick-12683SXcX5DibG4GB': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/var/tmp/magick-12683SXcX5DibG4GB': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `image' @ error/convert.c/ConvertImageCommand/3108.
Re: Need Help Urgently: Convert CR2 to png
HI All,
Can anyone help me here. I am setting up IM and dcraw in standard environment and just wanted to correct delegate file entry which can work.
Can anyone help me here. I am setting up IM and dcraw in standard environment and just wanted to correct delegate file entry which can work.
Re: Need Help Urgently: Convert CR2 to png
Are you using dcraw or dcraw_simple? They have different command line arguments. The windows delegate for dcraw is specified like this:
Code: Select all
"dcraw.exe -6 -w -O "%u.ppm" "%i""
//Your command should probably be this:
"/opt/local/bin/dcraw -6 -w -O "%u.ppm" "%i""
Re: Need Help Urgently: Convert CR2 to png
Thanks for reply !
I am using dcraw now in my linux environment. Used below entry in delegates.xml :
<delegate decode="dcraw8" command="/opt/local/bin/dcraw -6 -w "%u.ppm" "%i""/>
Command : convert dcraw8:test.CR2 test.png
Error :
sh-3.2# convert dcraw8:test.CR2 test.png
/var/tmp/magick-19753aYPGQb0Wn69N.ppm: No such file or directory
convert: unable to open image `/var/tmp/magick-19753aDp9tTSWn3mq': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/var/tmp/magick-19753aDp9tTSWn3mq': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3108.
I am using dcraw now in my linux environment. Used below entry in delegates.xml :
<delegate decode="dcraw8" command="/opt/local/bin/dcraw -6 -w "%u.ppm" "%i""/>
Command : convert dcraw8:test.CR2 test.png
Error :
sh-3.2# convert dcraw8:test.CR2 test.png
/var/tmp/magick-19753aYPGQb0Wn69N.ppm: No such file or directory
convert: unable to open image `/var/tmp/magick-19753aDp9tTSWn3mq': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: unable to open file `/var/tmp/magick-19753aDp9tTSWn3mq': No such file or directory @ error/constitute.c/ReadImage/591.
convert: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3108.
Re: Need Help Urgently: Convert CR2 to png
You are missing the '-O' option.