http://www.spack.org/wiki/CommandLine#head-012e4cbcb1e2547009412a81b9379a38fc42dece See also: GallerySoftware, ImageMagickHints
Tips and Tricks
- How to bulk convert from one image type to another:
mogrify -format jpeg *.png (converts all images of type jpeg to png)
mogrify *.jpg *.png (converts all images with extension jpg to png)
- How to automatically optimize png files for size:
pngcrush -brute original.png new.png (tries all compression techniques and automatically selects the best)
- How to scale an image to a certain height:
convert -geometry x640 original.jpg new.jpg
mogrify -geometry x640 *.jpg
- How to scale the longest dimension of an image to a certain height:
convert -geometry 640x640 original.jpg new.jpg
mogrify -geometry 640x640 *.jpg
- How to force an image to exact dimensions:
mogrify -resize 640x480! image.jpg
- How to rotate an image 90 degrees clockwise:
mogrify -rotate 90 image.jpg
Tool Sources
pngcrush can be found at http://pmt.sourceforge.net/pngcrush/
mogrify and convert are part of the Image Magick and can be found at http://www.imagemagick.com/
Linux/TipPs/BilderManipulation (last modified 2008-11-04 06:59:56)