Snippets - Resize and crop
NOTE: Most of the IM snippets have been tested on IM version 6.3.5 There may be some differences if you are using the code on other versions.
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.
<?phpexec("convert input.jpg -resize '250x90>' output.jpg");?>
For more examples and information check out the main Imagemagick section.
Clone ViewCrop an image View
Crop an image into pieces View
Dividing an image View
Keep minimum image size View
New image size in variable View
Resize if over certain size View
Resize keep aspect ratio. View
Resize no aspect ratio. View
Speed up jpg resize View