In my application i have an image in a div,a button.
I want to rotate the image displayed and save the rotated image when i clicked on the button using jquery.
//define image path $filename="image.jpg"; // Load the image $source = imagecreatefromjpeg($filename); // Rotate $rotate = imagerotate($source, $degrees, 0); //and save it on your server... imagejpeg($rotate, "myNEWimage.jpg");
Take a look at:
imagerotate()
And:
file_put_contents()