It would be useful to know some examples of formats and environments that the script has been tested with. I'm testing on fedora 23 but the end user needs it on OSX.
1) bash complains about -gt expecting a unary operator at line 239 because at the line
Code: Select all
fullsize=`convert $tmpA1 ${ftype}:- | convert - -ping -format "%b" info: | tr -d "[:alpha:]"`
Code: Select all
if [ -z $fullsize ]; then
fullsize=$(du "$outfile" | cut -f1 )
fi
Code: Select all
$ ./downsize.sh -s 2500 -t 15 Scan0001.jp2 0001.jp2
0
2.5e+06
./downsize.sh: line 244: [: 2.5e+06: integer expression expected
Code: Select all
downsize.sh[91]: whence: downsize.sh: not found
dirname: operando mancante
Try 'dirname --help' for more information.
basename: operando mancante
Try 'basename --help' for more information.
Code: Select all
convert: unable to write pixel cache `/tmp/magick-21362ZcAQ8qAzXoHy': Spazio esaurito sul device @ error/cache.c/WritePixelCachePixels/5525.
convert: unable to extend cache `./downsize_1_21321.mpc': Spazio esaurito sul device @ error/cache.c/OpenPixelCache/3728.