Forum Xamarin.Android

Suppressing "libpng warning : iCCP: Not recognizing known sRGB profile that has been edited"

MihaMarkicMihaMarkic SI ✭✭✭✭
edited January 2015 in Xamarin.Android

Do we have a workaround for these, highly annoying warnings?

libpng warning : iCCP: Not recognizing known sRGB profile that has been edited

Looks like a problem in libpng and google is saying that they'll fix it in future.
Meanwhile it seems that the only solution is to strip the png metadata (the source of warnings), however with Xamarin components (i.e. Support.v7 is using those) might not be that easy.
Hence, what would be the way to strip metadata from problematic pngs on Windows?
Should we strip metadata from C:\Users[USER]\AppData\Local\Xamarin\Android.Support.v7.AppCompat\19.1.0\content\support\v7\appcompat\res\drawable* folders? Will Xamarin overwrite these pngs?!topic/adt-dev/rjTQ_STR3OE


  • SteveDavisSteveDavis USMember

    I found that using Yahoo SmushIt worked for me. It removes unnecessary bytes from image files.

  • CheesebaronCheesebaron DKInsider, University mod

    Problem is it also happens on images that come from Android Support libraries.

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    @Cheesebaron hihgly annoying to have those insignificant warnings all around. Bloody google.

  • CheesebaronCheesebaron DKInsider, University mod

    Well it is not entirely google's fault. It comes from an update of libpng inside of the Android SDK. Hopefully they will fix their images soon.

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    Sure but I guess it shouldn't be hard to iterate all the images and fix them with a script.

  • oyeluisoyeluis MXMember
    edited March 2015

    I found a workaround that may help.

    I downloaded the ImageOptim software: (Free)

    and went to the folder Xamarin/Android.Support.v7.AppCompat/21.0.3/embedded and drag the images into the imageoptim and it deleted the metada.

    And that fixed.

  • MihaMarkicMihaMarkic SI ✭✭✭✭

    I was thinking that that trick might work. The question is whether Xamarin will rewrite those fixed images and when.

  • GerryHighGerryHigh USBeta ✭✭✭

    @oyeluis solution of using ImageOptim on the Xamarin support libraries worked for me.

    Note that these files are in ~/.local/share/Xamarin/...

  • JaykeBirdJaykeBird USMember

    For those on Windows and Linux, you'll want a command-line tool called ImageMagick. Running the "Mogrify.exe" command with the "-strip" switch will strip all the metadata from the PNG files, including the color profile stuff. Do note that if there is any other metadata you want to keep, you'll have to look into figuring out how to keep it. There is a way, but I don't know it.

  • I also got same warning...what is the exact matter..i am just beginner..

  • RobertBruceRobertBruce USMember ✭✭

    Here’s a way to resolve the issue within Visual Studio (I'm using VS2015) on a file-by-file basis:

    Double-click the offending image file in the Project window to bring up Visual Studio’s image editor window.

    Press “P” (shortcut to the “Draw a free-form line” tool).

    Select a color from the Properties window that exactly matches an area in your image (e.g. white).

    Paint over a few pixels in that area, save, and rebuild. The warning for that file should disappear.


  • MimiMimi PHMember ✭✭
    edited August 2016

    @RobertBruce, it didn't work for me...

  • voidstreamvoidstream FRMember ✭✭✭
    edited January 2017
Sign In or Register to comment.