【问题标题】:Image circle cropping in imagemagickimagemagick中的图像圆裁剪
【发布时间】:2017-03-21 14:28:32
【问题描述】:

各位,我正在使用 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的输出:

如果我遗漏了什么,请告诉我。

【问题讨论】:

    标签: image command-line imagemagick crop


    【解决方案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
    

    【讨论】:

      猜你喜欢
      • 2016-07-26
      • 2012-05-19
      • 2018-07-15
      • 1970-01-01
      • 2013-08-06
      • 2012-06-20
      • 2021-06-12
      • 1970-01-01
      • 2019-01-11
      相关资源
      最近更新 更多