Search This Blog

Monday, March 06, 2006

How to generate thumbnails

To create thumbnails use the -thumbnail option of the convert command. This option preserves the aspect ratio of the picture. So you need to specify just the width or height of your thumbnail.

Sample commands look like

convert -thumbnail 160 original.jpg thumbnail.jpg
convert -thumbnail x160 original.jpg thumbnail.jpg

The first one creates the thumbnail whose width is 160 pixels. The second one creates a thumbnail whose height is 160 pixels.

Ref :- Linux Multimedia Hacks - Tips & Tools for taming images, audio, and video by Kyle Rankin

On Debian GNU/Linux machines, convert command is part of imagemagick package. You can install the imagemagick package using apt-get

apt-get install imagemagick

Feedback, comments, suggestions are most welcome and can be left in the comments field of this blog.

No comments:

Followers