是否可以使用PHP-GD/ImageMagick/Inturestention压缩诸如TINYPNG/PNGQUANT之类的PNG?

发布于 2025-02-03 04:20:54 字数 355 浏览 3 评论 0原文

是否可以使用PHP/GD,PHP/ImageMagick和/或Inspertion/Image(Image/image)等香草PHP工具(尺寸降低和质量保留)来压缩类似于tinypng/pngquant的结果? tinypng/pngCompression有时可以减小图像尺寸的90%,而不会失去足够的质量以被普通用户注意到。

我已经尝试使用干预效果以70%的质量进行调节:

 $img = $img->encode('png', 70);

但是图像尺寸的含量超过了我在TinyPng中压缩的两倍。在服务器中安装Quantpng并不总是可能或容易的,这就是为什么我想知道是否可以在不安装它的情况下获得类似的结果。

Is it possible to compress PNGs with results similar to TinyPNG/PngQuant in regards to size reduction and quality retention, using vanilla PHP tools like PHP/GD, PHP/Imagemagick and/or intervention/image? TinyPng/PngCompression can sometimes reduce 90% of image size without losing enough quality to be noticed by normal users.

I already tried econding with 70% quality with intervention:

 $img = $img->encode('png', 70);

But image size is aways more than the double of what i get compressing it in TinyPng. Installing quantPng in the server isn't always possible or easy, that's why i would like to know if similar results can be obtained without having to install it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文