Batch Conversion of jpegs to thumbnails

Ken Moffat ken at
Sat Jul 19 15:12:31 PDT 2003

On Sat, 19 Jul 2003, Archaic wrote:

> On Sat, Jul 19, 2003 at 07:54:02PM +0100, Andrew Cowper wrote:
> >
> > Here's what I did just yesterday - utils from jpeg v6b and libungif
> > 4.1
> >
> > for i in `ls *.jpg`; do echo $i;
> >   djpeg -gif $i | gifrsize -s 0.1 > thumbs/`echo $i | cut -d. -f1`.gif;
> > done
> >
> > Hope this helps
> I'll read up on the man pages and give it a shot. Not having read them
> yet, I hope I can ungif them and re-jpeg them. Time to read. Thanks! :)

 If ImageMagick isn't doing it for you, you could consider netpbm
(  I hesitate to recommend this because all the
man pages point to a website, but it seems to have a _very_ wide range of
tools.  There's a good introduction to the formats, and list of which
commands actually exist, on the SF site (there are four formats, I find
it hard to guess whether I can use ...topnm or ...topam).  There's also
an example of using it for thumbnails in Larry Wall's online columns
(sorry, I don't have the url handy) : use djpeg to start the process and
cjpeg to end it, with pnmscale or pnmscalefixed in the middle.

 At least netpbm is straightforward to build,  and you'll need it (among
many other things) if you ever try to build the kernel DocBook

You'll always find me out to lunch
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list