1

So I ended up slicing all my functions up and debug why the quality loss is happening in all pictures I am uploading. Now I have 2 lines of code, which is simple to understand and where the issue is.

See the quality loss:

http://gyazo.com/2ba4f42960a9b96b83f5eca4aadcf7e7

The right side is the original picture, and left picture is after this script:

$image = imagecreatefromjpeg('original.jpg');

imagejpeg($image, "newoutput.jpg", 100);

my newoutput.jpg decrease, and gets "matt" / gets darker for some reason?

I have found that it could be the quality param in imagejpeg, but it is already 100.

How can I please solve this?

Karem
  • 17,615
  • 72
  • 178
  • 278
  • libgd seems to always output at a lower quality than input. If quality is important to you I'd recommend swapping to imagemagik (sp?) that alawys seems to at very least maintain quality. I'm yet to work out how sites like flickr etc do it as their image quality even after doing web based alterations is amazing I guess they're using custom image manip libraries instead of gd or imagemagik – Dave Dec 11 '13 at 14:35
  • what does identify show for original.jpg ? – exussum Dec 11 '13 at 15:07

0 Answers0