Home Tutorial Php Phpgd PHP GD rotate image

 
 

PHP GD rotate image
Posted on: November 11, 2009 at 12:00 AM
This example shows how to rotate image in php gd.

<?php

$image = 'images.jpg';

$degrees = 180;

header('Content-type: image/jpeg') ;

$source = imagecreatefromjpeg($image) ;

$rotate = imagerotate($source, $degrees, 0) ;

imagejpeg($rotate) ;

?>

After running the program you will get the following output

Related Tags for PHP GD rotate image:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.