2016-11-08 112 views
-1

人们,我使用imagemagick从图像中裁剪出一个圆圈。但我得到什么,当我运行此命令:imagemagick中的图像圆形裁剪

convert input.jpg +clone -threshold -1 -negate -fill white -draw "circle 539,539 539,0" -alpha off -compose copy_opacity -composite output_circ.jpg 

我得到的输出喜欢this

请让我知道如果我失去了一些东西。

回答

1

基本上,你只是缺少一个方面 - JPEG文件不能存储透明度,所以你需要使用PNG或GIF,例如。

convert input.jpg -alpha on \(+clone -threshold -1 -negate -fill white -draw "circle 539,539 539,0" \) -compose copy_opacity -composite output_circ.png