开发者

PHP GD library losing quality. Other ideas?

开发者 https://www.devze.com 2023-01-13 03:48 出处:网络
So I\'m in the middle of working on a website that deals with photogra开发者_C百科phs.A user uploads their original photograph and GD library creates a smaller sized image of the same photo.However, w

So I'm in the middle of working on a website that deals with photogra开发者_C百科phs. A user uploads their original photograph and GD library creates a smaller sized image of the same photo. However, when comparing a manually sized down image with the GD one, the GD image seems to lose quite a bit of color quality like it had been slightly desaturated. Any alternate suggestions or ways to improve this?

Thanks!


I'd advice using imagemagick for handling anything serious about photos.

besides quality, you'll find using imagick functions like more convenient

Imagick::cropThumbnailImage()
Imagick::thumbnailImage()


Use imagecopyresampled instead of imagecopyresized. It gives much better quality. Also, try NOT to use GIF images as output.


Wow, the answer is imagemagick. Easier to use and maintains the full photograph quality!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号