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 keep aspect ratio. - Anthony 21/6/2008
Resize the image to 250 maximum wide x 90 maximum height keeping the aspect ratio.
<?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