Last active
October 25, 2015 11:13
-
-
Save onyxmueller/4834a05154290e224c61 to your computer and use it in GitHub Desktop.
A Bash shell script to strip metadata from Android PNG resources.
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 | |
# | |
# Get rid of 'libpng warning: iCCP: Not recognizing known sRGB profile that has been edited' compilation warnings | |
# from AAPT by running this Bash shell script in the root folder of your Android project. This will use exiftool | |
# to remove PNG metadata (created by tools like Photoshop) from your Android project's PNG resources. | |
# | |
# NOTE: exiftool needs to be installed and in your path. Install it using homebrew or some other method. | |
# | |
command -v exiftool >/dev/null 2>&1 || { echo >&2 "exiftool is required but is not installed. Try installing exiftool with homebrew. Aborting."; exit 1; } | |
find . -regex '.*/src/main/res/.*png' -exec exiftool -overwrite_original -all= {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment