i have a problem with the imagerotate() PHP function. I run the script below, and it successfully creates the new image with imagejpeg(), but the new image is the same as the original, so it doesn't rotate it. It shows no error message in the Apache error.log, so i have no idea.
$file contains a filename in this form: IMG_8841.JPG
I hope you can help me, thanks.
$filename='./original/'.$file;
$new='./rotated/'.$file;
$original_photo = imagecreatefromjpeg($filename);
imagerotate ($original_photo , 90 , 0 );
imagejpeg($original_photo, $new);
imagedestroy($original_photo);