I have a zsh script. There is a function ...
imgPrep()
{
local inFilePath=$1
local outFilePath=$2
local cropHeight=$3
local resize=$4
shift; shift; shift; shift
local options=$@
convert ${inFilePath} -crop 0x${cropHeight}+0+0 +repage -resize ${resize}% ${options} ${outFilePath}
}
I call the function like so:
IMoptions="-despeckle -unsharp 0x3+1+0"
imgPrep ${inputImgFilePath} ${headerImgFilePath} ${headerHeight} ${scale} ${IMoptions}
convert command fails , presumably because single quotes should not be there.
convert somefile.jpg -crop 0x60+0+0 +repage -resize 410% '-despeckle -unsharp 0x3+1+0' output.tif
convert: unrecognized option `-despeckle -unsharp 0x3+1+0' @ error/convert.c/ConvertImageCommand/1437
How do I fix this please?