ImageMagick重力参数 [英] ImageMagick Gravity parameter
问题描述
我正在尝试创建一个过程来自动生成上传到我网站的图片的缩略图。
I'm trying to create a process to automatically generate thumbnails of the images uploaded to my website.
我正在使用此命令行:
-thumbnail "120x90>" -quality 95 -background transparent -gravity Center -extent 120x90 img.png
缩略图生成没有问题,具有正确的宽高比。但选项 - 重心似乎什么都不做,实际的图像总是对齐到画布的左边,当我想让它居中...我错过了什么?
The thumbnail is generated without problems, with the correct aspect ratio. but the option -gravity center seems that is doing nothing, the actual image is always aligned to the left of the canvas, when i want it centered...Am i missing something?
测试输入:
替代文字http://img17.imageshack.us/img17/1041/monalisa171p.jpg
结果:
alt text http://img684.imageshack.us/img684/ 3267 / o2paqlxsthumbnail.png
推荐答案
使用www.imagemagick.org上的最新版本更新了convert.exe ...田田!问题解决了。
Updated the convert.exe with the latest release from www.imagemagick.org and...tada! problem solved.
这篇关于ImageMagick重力参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!