Page 1 of 1

compress pictures to fit a file size?

Posted: 2008-01-29T05:08:41-07:00
by inigomena
Hi, as well as it is possible to resize files to fit a width and height, I'd like to be able to recompress JPG files to fit a certain file size if they are bigger than this size, is there an option to do this?

Re: compress pictures to fit a file size?

Posted: 2008-01-29T12:43:43-07:00
by fmw42
see the ">" symbol with -resize widthxheight>

http://www.imagemagick.org/script/comma ... php#resize

Re: compress pictures to fit a file size?

Posted: 2008-01-29T14:13:03-07:00
by inigomena
thanks, but I mean size in KB 8)

Re: compress pictures to fit a file size?

Posted: 2008-01-30T20:10:50-07:00
by anthony
File compression is a complex issue with so many factors results are not predicatable.

As such your only option is to use trial and error. that is resize and adjust quality until you get the image file size and other attributes you want.

PNG images (which is not lossy) has programs to try to find the minimal file size without image loss. JPEG is very different in this regard.