imagemagick - what is best way to rotate an image using php or convert command? -
what best way rotate image using php or convert command?
use php function imagerotate
http://php.net/manual/en/function.imagerotate.php
example:
<?php // file , rotation $filename = 'test.jpg'; $degrees = 180; // content type header('content-type: image/jpeg'); // load $source = imagecreatefromjpeg($filename); // rotate $rotate = imagerotate($source, $degrees, 0); // output imagejpeg($rotate); // free memory imagedestroy($source); imagedestroy($rotate); ?>
Comments
Post a Comment