Imagemagick

Last change 23/07/2007

Imagemagick (from http://www.imagemagick.org) is probably one of my favorite image tool. Here is stuff I oftne use.

Repeating background

You have a header image and want the very left and/or right one-pixel line in order to be able to nicely repeat it.

First find out the width/height of the banner (in the example case its 192x800 pixel) - then just use crop (works with gif/jpg etc too) 

convert top.png -crop 1x192+0+0 +repage left.png
convert top.png -crop 1x192+799+0 +repage right.png

Create a thumbnail

This is probably the most usefull function - and pretty easy to use.

While supporting a big portal (the teendays event), I found out that most thumbnails created (they were only max 100x100pixels) where a few kilobytes big... too big in my opinion. I found out that the problem is the profile stored in the images, after removing the profile with the option "+profile *" the files shrank to about 1k - 2-4k smaller than before without quality loss!!!
 

If the thumbnails are poor quality you might want to play around with " -quality 70" (change number)

# create a nice thumbnail 100x100 max (relation taken from original)
mogrify +profile "*" " -size 100x100 -resize 100x100 somepic.jpg

Create a thumbnail from a video

Videos are getting bigger and bigger nowadays. If you want a preview image of your avis imagemagick is a great help there too.

Remember: you can always use resize too. the [0] is the first frame of the video... you can increase the number if you want an image form in between 

convert -quality 90  somevideo.avi[0] somevideo.jpg

Site created with Corinis CCM