Imagemagick

From Alessandro's Wiki
Jump to navigation Jump to search
  • create a copy resized inside a subfolder for every 48 64 128 256, of all png's in the directory

<syntaxhighlight lang="bash" >

for n in 64 128 256 512;do [ -d $n ] || mkdir $n;for a in `ls -1 *.png *.jpg *.gif`;do convert  -resize ${n}x${n} "${a}" "${n}/$a";done;done

</syntaxhighlight>