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.
Clone - Anthony 14/6/2008
This code reads in the image, copys it with +clone, resizes and saves it. Then resizes and saves the next size. The part of the code within the ( ) has no effect on any of the other part of the code.
<?php$cmd = "input.jpg ( +clone -resize 600x600 -write first_save.jpg +delete )"." -resize 60x60 thumbnail.jpg ";exec("convert $cmd");?>
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