How can I rotate an image?
This takes the image to rotate, the angle of rotation, and a color to fill the blank space around the rotated image with.
Here's an example:
<?php
$original = imagecreatefrompng("myimage.png");
$red = imageColorAllocate($original,255,0,0);
imagerotate($original,50,$red);
header("content-type:image/png");
imagepng($rotated);
imagedestroy($original);
imagedestroy($rotated);
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More images PHP Questions
Please can any one help me to solve this problem how to comparer two images and show the dissimilarities in third image in php code?I recently updated from shared servers to virtual dedicated, I now cannot see any of the images I try to upload. The hosting company says that the script for the images are in the root directory but the images are not. The programmer said he didn't c
how to rotate an image using php code?
How can I find the colour of a pixel of an image?
how can i load images with php?
