问题描述
我正在使用ImageMagick调整图像大小。如果我传递-resize WxH选项,它的行为与预期一致。但如果我通过-resize WxH! (为了在调整大小期间忽略宽高比),某些图像(尤其是PNG)的大小实际上是增加。 200k图像变为450k,170k图像变为360k等等。
I am resizing images using ImageMagick. If I pass a -resize WxH option it behaves as expected. But if I pass -resize WxH! (to ignore aspect ratio during resize), some images, especially PNGs, are actually increasing in size. A 200k image becomes 450k, a 170k image becomes 360k and so on.
任何想法为什么会出现这种情况以及如何修复它?
Any ideas why this is hapenning and how to fix it?
谢谢
推荐答案
经过研究,我将ImageMagick版本从6.3.7升级到6.5.6,现在它工作得很好。调整图像大小会生成较小的图像,一切正常。
After researching, I upgraded my ImageMagick version from 6.3.7 to 6.5.6, and now it is working great. Resizing images is generating smaller images and everything is OK.
这篇关于ImageMagick PNG调整大小增加文件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!