Back to the snippets index

Resize if over certain size

( Anthony 21/6/2008 )

Only resize the image if it is over the set sizes. Note the images are read into the memory to check the size then saved anyway this will cause some compression on jpg images. Check the file size externaly to prevent this.

IM code:

("convert input.jpg -resize '250x90>' output.jpg");

Link for more information