girlzlover12 Posted May 11, 2009 Share Posted May 11, 2009 I have been trying to rotate an image for a while now but I cant get it to work right. It seems to be rotating the image not the whole canvas. I am trying to rotate the image, then resize it , then save it, and store the details in my db. The only thing I cant get working right is the rotation (it works but clips parts of the image and fills portions with black space. Must use GD as I don't have ImageMagic Can anyone tell me how I can rotate the image and not loose any part of it due to hanging over the sides. I will give you free advertising on the website I will be using this on if you can help me. http://myiphonebackgrounds.com I would be happy to give you a permanent banner along the side of all pages or put in the top banner rotation plus a friends site link. my source variable is $oldImage and I would like to store the rotated image into that same image file. the size of the imgae is in $width and $height. for now I would like to rotate the image 90 or 270 degrees but in the future I would like to do more. thank you for your time. Quote Link to comment https://forums.phpfreaks.com/topic/157743-rotate-image/ Share on other sites More sharing options...
BK87 Posted May 17, 2009 Share Posted May 17, 2009 post up come code my friend. otherwise no help. Quote Link to comment https://forums.phpfreaks.com/topic/157743-rotate-image/#findComment-835661 Share on other sites More sharing options...
jazz Posted May 24, 2009 Share Posted May 24, 2009 It is rather trivial. You need to make your canvas BIGGER first, THEN rotate the image and finally CROP it to the correct size to remove the white/black extra space that was added. That 's all. Also, your site has a rather huge security bug... Quote Link to comment https://forums.phpfreaks.com/topic/157743-rotate-image/#findComment-841180 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.