Skip to content

Instantly share code, notes, and snippets.

@aksswami
Last active May 6, 2017 13:46
Show Gist options
  • Save aksswami/db726826d877242cd01f5c3e29f6baa9 to your computer and use it in GitHub Desktop.
Save aksswami/db726826d877242cd01f5c3e29f6baa9 to your computer and use it in GitHub Desktop.
Bash script tp remove image background and make it transparent. (For multiple images)
#!/bin/bash
for i in $( ls | grep 'loading_animation' ); do
convert $i -fill none -fuzz 12% -draw "matte 0,0 floodfill" -flop -draw "matte 0,0 floodfill" -flip -draw "matte 0,0 floodfill" -flop -draw "matte 0,0 floodfill" -flip $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment