Page 1 of 1
Error DrawImage/3262
Posted: 2016-06-27T20:19:42-07:00
by dark713
Hello I'm trying to run through some tutorial to get rid of background I am trying to run this command but keep getting the error below. I've tried googling the specific number 3262 and it is non existent.
C:\test>convert 1a.png -bordercolor white -border 1x1 -fill none -fuzz 7% -draw "matte 1,1 floodfill" -shave 1x1 white_floodfill.png
convert: non-conforming drawing primitive definition `matte' @ error/draw.c/DrawImage/3262.
Re: Error DrawImage/3262
Posted: 2016-06-27T20:35:30-07:00
by snibgo
Please read
IMPORTANT: Please Read This FIRST Before Posting
"3262" is the line number within draw.c that generated the error.
Re: Error DrawImage/3262
Posted: 2016-06-27T20:41:24-07:00
by dark713
Is that a file I can look in to see what its referring too? I don't seem to be finding it
Re: Error DrawImage/3262
Posted: 2016-06-27T20:44:15-07:00
by fmw42
What version of Imagemagick are you using? Please always provide your IM version and platform when asking questions as per the link user snibgo provided.
In current versions, matte is replaced by alpha.
Re: Error DrawImage/3262
Posted: 2016-06-27T20:51:11-07:00
by dark713
Version: ImageMagick 7.0.2-1 Q16 x64 2016-06-23
http://www.imagemagick.org
C:\test>convert 1.png -bordercolor white -border 1x1 -fill none -fuzz 7% -draw "alpha 1,1 floodfill" -shave 1x1 white_floodfill.png
This seems to be working so far
Re: Error DrawImage/3262
Posted: 2016-06-27T20:56:10-07:00
by dark713
Does the -fill command work with -alpha anymore is there another term? Sorry pretty new to this
C:test>convert difference.png -bordercolor white -border 1x1 -alpha -fill none -fuzz 7% -draw "alpha 1,1 floodfill" -shave 1x1 removed_black.png
convert: UnrecognizedAlphaChannelOption `-fill' @ error/convert.c/ConvertImageCommand/706.
Re: Error DrawImage/3262
Posted: 2016-06-27T20:57:47-07:00
by dark713
C:test>convert difference.png -bordercolor white -border 1x1 +alpha -fill none -fuzz 7% -draw "alpha 1,1 floodfill" -shave 1x1 removed_black.png
+alpha instead of - works
Re: Error DrawImage/3262
Posted: 2016-06-27T21:01:04-07:00
by fmw42
Why do you want to put in -alpha? Your use of -fill none and -draw "alpha ..." should make it transparent. There is no +alpha that I know about. It is likely being ignored. If you want to turn off transparency, then use -alpha off or -alpha opaque just before your output. But then why use -draw "alpha ..." in the first place?
If you do need -alpha for some reason that I do not understand, then you need to specify the argument for -alpha, such as -alpha on/off/transparent/opaque/set etc. See
http://www.imagemagick.org/Usage/masking/#alpha
Re: Error DrawImage/3262
Posted: 2016-06-27T21:18:33-07:00
by dark713
trying to follow this example
# start real
convert tool.png \( +clone -fx 'p{0,0}' \) -compose Difference -composite -modulate 100,0 +matte difference.png
# remove the black, replace with transparency
convert difference.png -bordercolor white -border 1x1 -matte -fill none -fuzz 7% -draw 'matte 1,1 floodfill' -shave 1x1 removed_black.png
composite -compose Dst_Over -tile pattern:checkerboard removed_black.png removed_black_check.png
# create the matte
convert removed_black.png -channel matte -separate +matte matte.png
# negate the colors
convert matte.png -negate -blur 0x1 matte-negated.png
# you are going for: white interior, black exterior
composite -compose CopyOpacity matte-negated.png tool.png finished.png
composite -compose Dst_Over -tile pattern:checkerboard finished.png finished_check.png
Re: Error DrawImage/3262
Posted: 2016-06-27T22:07:15-07:00
by fmw42
You are trying to copy an apparently very old example with outdated syntax.
convert difference.png -bordercolor white -border 1x1 -matte -fill none -fuzz 7% -draw 'matte 1,1 floodfill' -shave 1x1 removed_black.png
The -matte here is the old equivalent of the new -alpha set. But it is not needed. The -fill none ... -draw "alpha .." will enable the alpha channel automatically.
Composite is an old method that can be replaced with convert ... -composite. Thus you can in principle do everything in one command with appropriate use of parenthesis processing and clones.
See
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/basics/#parenthesis
http://www.imagemagick.org/Usage/basics/#clone
Can you point to the link to your example?