I made a shell script of almost 300 lines that create images using ImageMagick.
I run this script on a Debian Linux system.
My first line is : #!/bin/bash
Everything works well when I launch the script with the command line : sh myscript.sh arg
But if I lauch the script without sh it cast an error on a -distort function:
./myscript.sh arg
convert-im6.q16: invalid argument for option Perspective : 'require at least 4 CPs' @ error/distort.c/GenerateCoefficients/791.
The lines of the -distort call :
Code: Select all
convert front_large.png -bordercolor grey -border 3 -background 'rgba(0,0,0,0)' \
-virtual-pixel transparent +distort Perspective "0,0 0,${hgt} 0,${h} 0,${hgb} ${w},0 ${w},${0} ${w},${h} ${w},${h}" \
-gravity West -extent ${we}x${he} \
-fill white -stroke grey -strokewidth 3 -draw "rectangle ${r1x},75 ${r1w},${r1h}" \
-fill white -stroke grey -strokewidth 3 -draw "rectangle ${r2x},85 ${r2w},${r2h}" \
-fill white -stroke grey -strokewidth 3 -draw "rectangle ${r3x},95 ${r3w},${r3h}" \
+repage tmp1_output.png;
Any idea on what I could do to fix the problem when I'm lauching the script without sh ?
Thanks !