问题
I'm getting some very bad quality using GD to resize some PNGs. If I don't resize them, it seems fine, and if I use GD's negate filter, it seems fine as well, which is very weird. But nothing else seems to help.
This is happening with timthumb (latest) and aq_resize for wordpress.
Here is one image, processed with timthumb:
http://cdn.squidix.com/images/branding/name-white.png?h=150
The original of this image is white text over a transparent background. The white text has no border, it just blurs into transparency. It will only let me post one link here, take off the ?h=150 to see the original image (you won't see it in your browser, because it's completely white, download it to see it).
But after being processed with GD, it has grainy light gray artifacts in the background, and there's now a gray border around the white text. If you're using an LCD, look up at it from an angle and you'll see how bad it is.
Update: This doesn't happen with imagecopyresized, only imagecopyresampled.
PHPInfo - http://cdn.squidix.com/
来源:https://stackoverflow.com/questions/23200823/gd-quality-issue-with-transparent-pngs