Rotating images with PHP reduces quality especially over about 10-20 actions
Posted
by
Dylan Cross
on Stack Overflow
See other posts from Stack Overflow
or by Dylan Cross
Published on 2012-10-17T04:58:08Z
Indexed on
2012/10/17
5:00 UTC
Read the original article
Hit count: 169
I am using this code below to rotate my jpeg images, the problem is that after around 10-20 times of rotating the image the image is dramatically lower quality, especially blue skies and such, my question is how can I keep these images the same high quality image? There must be a way. I mean, i keep the original image on the server for each image uploaded, and I don't do anything to that, so if need be it, I guess I could always come up with some way of using that over whenever possible.. But would rather not have to.
$source = imagecreatefromjpeg($filename);
$rotate = imagerotate($source, 90, 0);
imagejpeg($rotate, $filename ,100);
© Stack Overflow or respective owner