Skip to content

Instantly share code, notes, and snippets.

@rupakraj
Created February 25, 2016 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rupakraj/5e7e58a666282ca9c2f7 to your computer and use it in GitHub Desktop.
Save rupakraj/5e7e58a666282ca9c2f7 to your computer and use it in GitHub Desktop.
PNG fixes: iCCP: Not recognizing known sRGB profile that has been edited
SRC: http://pmt.sourceforge.net/pngcrush/
Issue fixes for : #AAPT: *.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Use pngcrush to remove the incorrect sRGB profile from the png file:
pngcrush -ow -rem allb -reduce file.png
-ow will overwrite the input file
-rem allb will remove all ancillary chunks except tRNS and gAMA
-reduce does lossless color-type or bit-depth reduction
In the console output you should see Removed the sRGB chunk., and possibly more messages about chunk removals. You will end up with a smaller, optimized png file. As the command will overwrite the original file, make sure to create a backup or use version control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment