#!/bin/bash#-------------------------------------------------------# Bash-script autogenerated by im4java# at Sun Feb 24 17:46:46 CET 2013#-------------------------------------------------------
convert \\"/tmp/img1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.jpg"\
-scale "12" -rotate "34.0""/tmp/output.jpg"
Actual output:
1
2
3
4
5
6
7
8
9
#!/bin/bash#-------------------------------------------------------# Bash-script autogenerated by im4java# at Sun Feb 24 17:46:46 CET 2013#-------------------------------------------------------
convert \\"/tmp/img1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.jpg"\
-scale "12"-rotate "34.0""/tmp/output.jpg"
Note the missing space between "12"-rotate. Running the command, using convertCommand.run(imOperation), does work and produces the correct output image.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I finally found some time to look at it. The next version will contain a fix. Here's the diff:
--- src/org/im4java/script/AbstractScriptGenerator.java 11 Jul 2010 10:57:41 -0000 1.7+++ src/org/im4java/script/AbstractScriptGenerator.java 19 Mar 2013 18:42:44 -0000 1.8@@ -28,7 +28,7 @@
/**
This class is an abstract implementation of a ScriptGenerator.
- @version $Revision: 1.7 $+ @version $Revision: 1.8 $
@author $Author: bablokb $
@since 1.0.0
@@ -272,6 +272,7 @@
iLineBuffer.append(pBuf);
} else {
// the given buffer still fits, so append to the line
+ iLineBuffer.append(" ");
iLineBuffer.append(pBuf);
iLineBuffer.append(" ");
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When using long filenames, the script output misses a space and will therefore not run.
Example code:
Expected output:
Actual output:
Note the missing space between "12"-rotate. Running the command, using convertCommand.run(imOperation), does work and produces the correct output image.
Thanks for the detailed bug-report. I couldn't find anything obvious in the code, I will have to take some time to analyze it.
Bernhard
I finally found some time to look at it. The next version will contain a fix. Here's the diff: