ImageMagick中的质量选项
我正在使用ImageMagick的CLI导出独特图片的裁剪图像:
convert -quiet a.jpg -write mpr:uniquePicture \( mpr:uniquePicture -crop 10x10+5+5 +repage -write b.jpg +delete \) null:
在我的脚本中,有很多“ \(\)”具有不同的作物参数。
这效果很好,但我想控制导出图片的质量(在我的示例中“ B.JPG”)。如果我在“ \(\)”内部有“ - 质量90”,那是一个错误……
那么,是否可以使用“ \(\)”内部使用JPG质量的方法?
蒂埃里
I am using the CLI of imagemagick to export cropped images of a unique picture:
convert -quiet a.jpg -write mpr:uniquePicture \( mpr:uniquePicture -crop 10x10+5+5 +repage -write b.jpg +delete \) null:
In my script there are a lot of "\( \)" with different crop parameters.
This works perfectly but I would like to control the quality of the exported picture ("b.jpg" in my example). If I had "-quality 90" inside the "\( \)" there is an error…
So, is there a way to use the jpg quality inside the "\( \)"?
Thierry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在IM 6.9.12.50 Q16 Mac OSX Monterey上,这对我来说很好。
我怀疑您的命令行有问题。但您的ImageMagick版本和平台是什么。
请注意,我有 +写作,但是-write也有效。我通常使用 +写作以避免格式混乱的任何问题。
This works fine for me on IM 6.9.12.50 Q16 Mac OSX Monterey.
I suspect there is something wrong with your command line. But also what is your Imagemagick version and platform.
Note I have use +write, but -write works also. I generally use +write to avoid any issues with format confusion.