Skip to content

Instantly share code, notes, and snippets.

@spyesx
Last active November 20, 2020 12:56
Show Gist options
  • Save spyesx/ecea85538c387ea4fbb8963a7a55415a to your computer and use it in GitHub Desktop.
Save spyesx/ecea85538c387ea4fbb8963a7a55415a to your computer and use it in GitHub Desktop.
Fill all PNG, ICO, JPG and SVG in black. Useful to reset common assets such as apple-touch-* icons, favicons, android-* icons...
# https://explainshell.com/explain?cmd=for+file+in+.%2F**%2F**.%7Bpng%2Cjpg%2Cico%2Csvg%7D%3B+do+convert+%22%24file%22+-fill+black+-draw+%27color+0%2C0+reset%27+%22%24file%22%3B+printf+%27.%27%3B+done
for file in ./**/**.{png,jpg,ico,svg}; do convert "$file" -fill black -draw 'color 0,0 reset' "$file"; printf '.'; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment