libpng warning : iCCP: Not recognizing known sRGB profile that has been edited
Recently started playing with XAMARIN and working on related stuffs. I created a Xamarin.Forms Shared
application, which creates an [ApplicationName].Droid
and [ApplicationName].iOS
project along with [ApplicationName]
shared project.
To work further on the images, I replaced the default XAMARIN icon image which is added in [ApplicationName].Droid\Resources\drawable
folder and additionally added image for Splash screen to be shown on application start-up on Android device.
Once I configured that, I started receiving an annoying warning for the two images when I build the project:
libpng warning : iCCP: Not recognizing known sRGB profile that has been edited
On quick search I found that most of the people out there fixed this issue by downloading PNG optimizer utility or processing the image(s) with online optimizer tools.
I use Visual studio so I was trying to find more direct and quick way to fix this issue. I came across a Visual studio extension developed by Mads Kristensen named Image Optimizer.
You can view details of this extension and download it from the Visual Studio Extension Gallery.
Once you have it installed, just right click on any image and click on "Optimize image" option.
This should start optimizing the image you selected and provide information of the optimization in the output window.
After I did that, the warnings were gone and [ApplicationName].Droid
project build without any issue.
Reference: I found this thread on XAMARIN forums where they are discussing similar ways.
If you read the extension description carefully, it says that
The optimization doesn't effect the quality of the images, but optimizes them using industry proven algorithms for removing EXIF and other metadata
which is the issue, google's build system complaining about.
Also from Mads's blog we know that the extension uses - SmushIt and PunyPNG utilitie inside.
Happy coding!