Reputation: 21
I've image an image with white background. I used command to make it transparent
convert imoji.png -fuzz 20% -transparent white result.pngI got the result.png. The command has removed pixels inside the emoji and some other parts. I need it to be something like this. I made it using photoshop by reducing the tolerance of the magic wand tool. Help me to do the same using the convert command in the terminal. I reduced the -fuzz 20 to 1% still not getting the result.
Upvotes: 2
Views: 850
Reputation: 1331
In the updated ImageMagick 7.1.1-20 version, matte is no longer supported as a command. Instead, use alpha:
convert imoji.png -fuzz 20% -fill none -draw "alpha 0,0 floodfill" result.png
You can install ImageMagick as follows:
brew install imagemagick
sudo apt-get install imagemagick
Upvotes: 2
Reputation: 53154
Use flood fill from the top left corner of the image in ImageMagick.
convert imoji.png -fuzz 20% -fill none -draw "matte 0,0 floodfill" result.png
Upvotes: 4