Rotate an Image
Monday October 30, 2006

You can use the GD Library with PHP to do many things with graphics. This script shows you how to rotate an image using PHP. Here we have rotated an image 180 degrees, however you can rotate by any degree value you want.


Comments
Call to undefined function imagerotate()
Somebody help me!
Why this function not work?
Nutt~Thailand
Hi Angela
Thanks for the script! I used it a while ago on a project - perfect.
I’ve added a version to my blog, it has a demo and people can download the source.
It’s basicly the same image rotation script, I simple prettied it up.
Once again - Thanks!!!!!
I tried using this on my website and it does not seem to work right it ads in black space to the one side and cuts off other parts of the image. I think its not creating the canvas at the right dimensions before rotating.