Snippets - Optimize
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");?>