PDA

View Full Version : Image Rotation...



pcbrainbuster
04-14-2007, 08:08 PM
Hello again huys :),

Is there anyway to rotate an image at a specified angle?

Thanks :)...

thetestingsite
04-14-2007, 08:13 PM
To my knowledge; no, not using javascript alone. You would have to first rotate the image in an Image editting program (such as MS Paint, GIMP, Paint.net, Photoshop, etc).

I could be wrong, but I am pretty sure that this would be the only way.
Hope this helps.

Twey
04-14-2007, 08:26 PM
Well yes, Walter Zorn has a highly experimental library (http://www.walterzorn.com/rotate_img/rotate_img.htm), but the way he does it (dividing the image up into single-pixel elements) is so terribly inefficient that it's completely impractical for ordinary use.

pcbrainbuster
04-14-2007, 08:29 PM
Hmmm, All I want to know is if it can be done with javascript thoguh thanks for your posts guys also I know there is the basicimage filter that will only rotate at 90 180 and 270 angles and not any specified ones...

npsari
04-14-2007, 08:34 PM
http://www.walterzorn.com/rotate_img/rotate_img.htm

Check this link

It gives you all angles

pcbrainbuster
04-14-2007, 08:39 PM
I had a look at it and thans for your post but it seems that it uses PHP I think... (have a look at the address bar when you enter your angle)...

thetestingsite
04-14-2007, 08:42 PM
No, it's just HTML and Javascript. When you enter the angle, you are not supposed to hit enter (return), instead you are supposed to click the link rots.newImg.rotateTo(.
Hope this helps.

//EDIT: the reason the url looks like this: something.htm?A=angle is because the textbox in the form is using the default "GET" method.

pcbrainbuster
04-14-2007, 08:54 PM
Oh Ok, thanks for your post TTS and npsari but, npsari: isn't there an tutorial available anywhere ?

npsari
04-14-2007, 08:55 PM
it says Javascript on the bar at the button

So, that means the script is javascript

Get the source of the page which should be there

Or do search in Google :)

pcbrainbuster
04-14-2007, 08:59 PM
Hmmm well I did try doing a search but ended up with scripts that display a different message every time you click :), but I guess i'll redo it ...

And as for the view source thing I guess I'll try that too but when you look at some one elses code it seems a little encoded to you as its not the style of coding your used to ...

pcbrainbuster
04-14-2007, 09:13 PM
OK I HAD IT !!!, I'm no longer searching as I keep getting reults of the thing mensioned above !!!

tech_support
04-15-2007, 04:17 AM
http://www.walterzorn.com/rotate_img/rotate_img.htm

Check this link

It gives you all angles
Twey already mentioned that link.