Im4java Raw2jpeg

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
pablo
Posts: 2
Joined: 2011-08-02T05:49:43-07:00
Authentication code: 8675308
Contact:

Im4java Raw2jpeg

Post by pablo »

Hello,

I am trying to use im4java to convert one image from raw format (nef and crw) to jpg. This works fine from the command line but from java i get the following error:

org.im4java.core.CommandException: org.im4java.core.CommandException: dcraw.exe -4 -w -O "C:/DOCUME~1/pepepe/CONFIG~1/Temp/magick-uqt4H1eu.ppm" "C:/DOCUME~1/pepepe/CONFIG~1/Temp/magick-UweR7d4A"
at org.im4java.core.ImageCommand.run(ImageCommand.java:215)
at es.steria.applet.TratarFichero.convertImages(TratarFichero.java:253)
at es.steria.applet.TratarFichero.main(TratarFichero.java:198)
Caused by: org.im4java.core.CommandException: dcraw.exe -4 -w -O "C:/DOCUME~1/pepepe/CONFIG~1/Temp/magick-uqt4H1eu.ppm" "C:/DOCUME~1/pepepe/CONFIG~1/Temp/magick-UweR7d4A"
at org.im4java.core.ImageCommand.finished(ImageCommand.java:247)
at org.im4java.process.ProcessStarter.run(ProcessStarter.java:314)
at org.im4java.core.ImageCommand.run(ImageCommand.java:211)
... 2 more

I have execute the following code:

String imPath="//10.90.43.1/Intercambio/ImageMagick-6.7.1-1";
ConvertCmd cmd = new ConvertCmd();
cmd.setSearchPath(imPath);
IMOperation op = new IMOperation();
op.verbose();
op.addImage("c:\\CRW_0001.CRW");
op.quality(70D);
op.addImage("c:\\output.jpg");
cmd.run(op)

Sorry if i should not post any error from im4java here, but maybe there is someone here who could help me.

Thank you.
pablo
Posts: 2
Joined: 2011-08-02T05:49:43-07:00
Authentication code: 8675308
Contact:

Re: Im4java Raw2jpeg

Post by pablo »

I already solved the problem, i had to set the temporary directory of image magick, it seems that the default one was too long or had incorrect characters.

Thank you
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests