Re: Simple way to script thumbnails

At Tue, 11 Jan 2011 17:43:55 +0000 Richard Kettlewell <rjk@xxxxxxxxxxxxxxx> wrote:

Stan Bischof <stan@xxxxxxxxxxxxxxxxxx> writes:

From any web search looks like there's so many possibilities
that a quick note here seems more productive, so...

I would like to write simple script to take a directory full
of arbitrary graphics files ( gif, jpg, png, tiff, etc ) and
generate constant-pixel-height thumbnails of them all. What's
a simple, small tool that I can install and use for this?

I would really like small/simple rather than a huge beast like
gimp. And of course a CLI is needed. Something that will work
on vanilla linux box ( no kde or the like ) without need
for a GUI.

So- has anyone here actually done this? If so what tool(s)?

Imagemagick is easy enough to drive from the shell.

Hint: 'identify <some image>' will yield info about the image
(including its size [HxW]).
'convert <some image> -geometry HxW <thumnail image name>' will
generate the thumbnail of the specificed size. Both identify and
convert can be used in a shell script and neither are GUI programs.
Both are part of the Imagemagick package.

Robert Heller -- 978-544-6933 / heller@xxxxxxxxxxxx
Deepwoods Software --
() ascii ribbon campaign -- against html e-mail
/\ -- against proprietary attachments