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

Popular posts from this blog

javascript - Complete OpenIDConnect auth when requesting via Ajax -

c# - Replace text in MailItem Body -

java - Get more than One value and display it -