How to rotate an image in Javascript

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
siji86
Forum Commoner
Posts: 30
Joined: Fri Mar 26, 2010 6:15 am

How to rotate an image in Javascript

Post by siji86 »

Hello Everyone,

I have an application in PHP which acts like a Image Editor kind of stuff. Now I have already implemented the functions for image resizing, image rotation,alignment, and moving the image around the whole area. Now the problem is that image rotation works like this, i have got 2 buttons, rotate left, rotate right, when the user clicks on rotate left, the PHP Script performs the neccessary function. But now, what i need is when i place my mouse pointer at the corners of the image, the cursor should change to the rotate image icon and then i could be able to rotate the image by moving my mouse. I tried googling, but i did not get any relevant answer.
Please can anybody of you guide me like, how should i go about this problem.

Thanks in Advance
:D
rnoack
Forum Commoner
Posts: 34
Joined: Mon May 03, 2010 12:38 am

Re: How to rotate an image in Javascript

Post by rnoack »

It seems to me that this is something which you would have to completely implement, and even then I'm not sure if Javascript is appropriate for this task ?
You might be better off making an actual Java Applet, or providing text boxes where people have to enter the amount they want to turn the picture rather than dragging it.
Post Reply