ImageMagick tools have a limited wildcard capability. If you pass multiple file names or the literal wildcard, it will create output files with sequential numbering, for example:
convert [a-e].png -resize 50% half.png
creates half-0.png, half-1.png, etc.
If you want to match the input file names, you'll have to call convert on one file at a time, in a loop, explicitly or via a tool. (Alternatively, you could rename the files afterwards, but there's no advantage in doing that.) Inside the loop, you can use zsh's filename manipulation or string manipulation constructs.
for i in [a-e].png; do
convert $i -resize 50% %{i:t}_half.png
done
If you use this in a script, you may want to add the N glob qualifier so that the wildcard pattern expands to nothing if there is no matching file: for i in [a-e].png(N); do …
Zsh comes with a tool to rename files based on patterns: zmv. You can use it for other name-based transformations.
autoload -U zmv
zmv -p convert -o '-resize 50%' '([a-e]).png' '${1}_half.png'
Alternate ways to write those name patterns include:
zmv -p convert -o '-resize 50%' '([a-e])(.png)' '${1}_half$2'
zmv -p convert -o '-resize 50%' -w '[a-e].png' '${1}_half.png'
zmv -p convert -o '-resize 50%' '[a-e].png' '${f:t}_half.png'
You can make aliases to put in your .zshrc:
autoload -U zmv
alias zcp='zmv -C'
alias zln='zmv -L'
alias zconvert='zmv -p convert'
The following wrapper is a bit nicer than the alias above as it removes the requirement of passing all the options to convert inside quotes. If you pass any zmv options, they must come before all convert options.
zconvert () {
typeset -a zmv_options=
while [[ $1 = -[finqQsvwW] ]]; do
zmv_options+=($1)
done
zmv -p convert $zmv_options -o "$@[1,-3]" $@[-2] $@[-1]
}