Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Resize Artifact #99
Following your recommandation on the mailing list I open a new issue : If I resize a picture to a size which is not a multiple of the original size I have artifacts on the white background.
I just had a test on php5.53 and the bug is still here :
Here is the code I used to test (test.jpg is a 1000x1000 jpeg)
You can find the resulting jpg in attachment (If you can't see the artifact just add contrast in photoshop)
A better testcase:
If I maximally decrease brightness and increase contrast, I can see artifacts, but these may be usual JPEG compression artifacts (note that JPEG quality 100 doesn't mean lossless compression). I suggest that you check with a PNG image (which is lossless).
I would need a good sample (original and resampled plus code) to reproduce the issue.
Hm, IMG_NEAREST_NEIGHBOUR is not everybody's favorite. If I'm not mistaken, that is the same as imagecopyresized().
The result is likely system dependent, but for me it's (current PHP master with bundled GD):
And (current PHP master with current GD master):