【问题标题】:Imagemagick non-conforming drawing primitive definition `matte' @ error/draw.c/DrawImage/3284Imagemagick 不合格绘图图元定义`matte'@error/draw.c/DrawImage/3284
【发布时间】:2018-01-29 22:29:03
【问题描述】:

我在 Windows 的控制台(cygwin x64)中执行了以下操作

 magick convert -verbose difference.png -fuzz 7% -draw 'matte 1,1 floodfill' test.png
difference.png PNG 216x107 216x107+0+0 8-bit Gray 11167B 0.000u 0:00.002
difference.png=>test.png PNG 216x107 216x107+0+0 8-bit Gray 8737B 0.078u 0:00.077

但是,我收到以下错误:

convert: non-conforming drawing primitive definition `matte' @ error/draw.c/DrawImage/3284.

请说明如何纠正此错误。

【问题讨论】:

  • 尝试使用alpha 代替matte
  • @MarkSetchell 我看到它有效。但他们做同样的事情吗?
  • ImageMagick 7 和 ImageMagick 6 之间发生了一些变化。在 floodfill 命令中,matte 关键字被替换为 alpha 关键字。过程还是一样的。同样在 IM 7 中,您使用魔法,而不是魔法转换。但是你确实需要魔法来识别、修饰、蒙太奇等。此外,IM 6 中的 -matte 变为 IM 7 中的 -alpha 设置,+matte 变为 -alpha off。还有其他变化。见imagemagick.org/script/porting.php#cli

标签: imagemagick


【解决方案1】:

绘图原语 matte 在 ImageMagick 7 中被 alpha 取代。来自 Porting to ImageMagick Version 7 文章。

DrawMatte() 方法现在称为 DrawAlpha()。

正如 Mark Setchell 在 cmets 中指出的那样,将 matte 替换为 alpha 应该可以按预期工作。

 magick convert -verbose difference.png -fuzz 7% -draw 'alpha 1,1 floodfill' test.png

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-18
    • 2019-12-18
    • 2015-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-02
    相关资源
    最近更新 更多