Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

imagemagick

I executed the following in console (cygwin x64) in Windows

 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

However, I got the following error:

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

Please mention on how I can correct this error.

like image 433
Kavinda Keshan Rasnayake Avatar asked Jan 29 '23 18:01

Kavinda Keshan Rasnayake


1 Answers

The drawing primitive matte was replaced by alpha in ImageMagick 7. From Porting to ImageMagick Version 7 article.

The DrawMatte() method is now called DrawAlpha().

As Mark Setchell pointed out in the comments, replacing matte with alpha should work as expected.

 magick convert -verbose difference.png -fuzz 7% -draw 'alpha 1,1 floodfill' test.png
like image 112
emcconville Avatar answered May 19 '23 02:05

emcconville