Last active
October 16, 2015 07:33
-
-
Save ls0f/35e168f7a78d02dad3fa to your computer and use it in GitHub Desktop.
image magick remove backgroud and set the backgroud transparent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
convert $1 -channel A -blur 1x65000 -level 50x100% \ | |
-channel rgba $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
convert $1 -fuzz 5% \ | |
-fill none -draw "matte 0,0 floodfill" \ | |
-flop -draw "matte 0,0 floodfill" \ | |
-flip -draw "matte 0,0 floodfill" \ | |
-flop -draw "matte 0,0 floodfill" \ | |
-flip -quality 100% $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
convert $1 -fuzz 5% -trim $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment