Um zum Beispiel Urlaubsbilder im Web zu publizieren, möchte man diese vorher verkleinern. Komfortabel und schnell geht das mit ImageMagick und folgendem Skript:
#!/bin/sh # # Script for converting size of images in a directory. # # check if parameters are given if [ $# -ne 2 ] then echo "Usage: makeThumbnail x y" echo "where x is width and y is height." exit 1 fi # create directory and convert images mkdir -p small for f in *.jpg do convert $f -resize $1x$2 small/$f done exit 0
ImageMagick muss evtl. erst noch installiert werden. unter *ubuntu und Debian z.B. mit apt-get install imagemagick.
I'm a Software Developer, currently working at