Page 1 of 1

filesize of an image

Posted: 2007-11-12T14:43:04-07:00
by webshaker
Hi I try to resize a big jpeg image to make a thumb....

the original picture is this one
http://scrapblog.chez-les-filles.com/rp ... =54.a5e682

the thumb is there
http://scrapblog.chez-les-filles.com/rp ... =54.a5e682

the command I use is the next one
convert -quality 85 -delay 250 thumb.jpg -resize 128x128 original.jpg

the question is:
Why does my thumb filesize is 30ko !!!!
It seem to be a litlle big no ?

thank's
Etienne

Re: filesize of an image

Posted: 2007-11-12T15:06:39-07:00
by Bonzo
Your code is a little bit wrong -delay is to do with animations and you are supposed to read the original image in first:

Code: Select all

// Tidy code - Resulting Filesize: 10.8477kb
convert original.jpg -resize 128x128 -quality 85 thumb.jpg
// Remove EXIF data etc. with -strip - Resulting Filesize: 3.66992kb
convert original.jpg -strip -resize 128x128 -quality 85 thumb.jpg
// Thumbnail strips any EXIF data anyway -Resulting Filesize: 3.66992kb
convert original.jpg -thumbnail 128x128 -quality 85 thumb.jpg

Re: filesize of an image

Posted: 2007-11-19T18:37:47-07:00
by anthony
Your JPEG image has a profile which is preserved in the thumbnail generating a huge file. Use -thumbnail rather than -resize which will also -strip the profiles form the final image.

See IM Examples, Thumbnailing
http://imagemagick.org/Usage/thumbnails/