This image rotation concept is most useful in gallery pages. You can able to fix the image where you want. you can able rotate image yourself in different ways.
Image rotation Concept :
index.php
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<title>image-rotation-concept using php</title>
</head>
<body>
<?php
$filename = ‘image-rotation-concept.jpg’;
$rotang = 60; // Rotation angle
$source = imagecreatefromjpeg($filename) or die(‘Error opening file ‘.$filename);
imagealphablending($source, false);
imagesavealpha($source, true);
$rotation = imagerotate($source, $rotang, imageColorAllocateAlpha($source, 0, 0, 0, 127));
imagealphablending($rotation, false);
imagesavealpha($rotation, true);
header(‘Content-type: image/jpeg’);
imagepng($rotation);
imagedestroy($source);
imagedestroy($rotation);
?>
</body>
</html>
