in reply to Making jpg thumbnails

Making thumbnails on the fly is generally a bad idea, make them once and cache 'em. I don't use perl for making mine. I use a shell script and djpeg/cjpeg. This only allows me to scale images by 1/2, 1/4 or 1/8, but that's good enough for me.

Replies are listed 'Best First'.
Re: Re: Making jpg thumbnails
by bradcathey (Prior) on Aug 26, 2003 at 15:31 UTC
    DrHyde: I agree with the "on the fly," that wasn't my real intent. However, can you tell me more about "shell script and djpeg/cjpeg?" Do you have any code you can send along. 1/8 would be perfect. The simpler the better. Thanks Brad
      From memory this will work to product thumbnails for all the .jpgs in the current directory:

      for i in *.jpg; do djpeg -dct float -scale 1/8 $i | cjpeg -dct float>$i.thumb.jpg; done

      djpeg and cjpeg are distributed with the JPEG group's libjpeg.