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.
Error DrawImage/3262
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Error DrawImage/3262
Please read IMPORTANT: Please Read This FIRST Before Posting
"3262" is the line number within draw.c that generated the error.
"3262" is the line number within draw.c that generated the error.
snibgo's IM pages: im.snibgo.com
Re: Error DrawImage/3262
Is that a file I can look in to see what its referring too? I don't seem to be finding it
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Error DrawImage/3262
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.
In current versions, matte is replaced by alpha.
Re: Error DrawImage/3262
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
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
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.
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
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
+alpha instead of - works
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Error DrawImage/3262
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
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
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
# 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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Error DrawImage/3262
You are trying to copy an apparently very old example with outdated syntax.
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?
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.convert difference.png -bordercolor white -border 1x1 -matte -fill none -fuzz 7% -draw 'matte 1,1 floodfill' -shave 1x1 removed_black.png
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?