Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am trying to change the color of the cursor in TextField in Titanium android app. For that I created platform/android/res/values/ folder.

I placed the following code in tiapp.xml:

<android xmlns:android="http://schemas.android.com/apk/res/android">
  <manifest>
    <application android:theme="@style/Theme.Titanium">
    </application>
    <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="22"/>
  </manifest>
</android>

When I am trying to run the app, getting the following error. I am working on 3.4.1. API Level is 22 only.

[ERROR] :  Failed to package application:
[ERROR] :  
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_clear_disabled.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_clear_normal.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_clear_normal.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_go.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_go.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_search.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-mdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-hdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xhdpi/abc_ic_voice_search.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
[ERROR] :  /var/folders/7f/5k6k5fvn2fdc5bgtv3hjmgnh0000gn/T/11558-48051-1806d86/res/drawable-xxhdpi/abc_ic_voice_search.png: libpng warning: iCCP: profile 'icc': 'GRAY': Gray color space not permitted on RGB PNG
[ERROR] :  /Users/murali/Documents/Titanium_Studio_Workspace/textboxapp/build/android/res/values/styles.xml:3: error: A 'type' attribute is required for <item>
[ERROR] Application Installer abnormal process termination. Process exit value was 1.
like image 725
user3921674 Avatar asked Jun 08 '15 12:06

user3921674


People also ask

How do I fix Libpng warning iCCP known incorrect Srgb profile?

If you are getting the above warning while loading a PNG image, it means the iCCP chunk is present in the image. This is not essentially an error so you can ignore it. But if you want to get rid of it, you have to remove the iCCP chunk.

How do I remove the iCCP chunk from a PNG in Python?

png out. png. To remove the invalid iCCP chunk from all of the PNG files in a folder (directory), you can use ImageMagick's mogrify *. png, provided that your ImageMagick was built with libpng16 (run convert -list format | grep PNG to be sure of that).


1 Answers

As the warnings say, you have a bunch of PNG files with invalid color profiles. Libpng16 issues warnings about them. Your application treats warnings as errors.

To work around this, you can do one or more of the following:

  • Use a PNG editor to remove the iCCP chunk from the PNG files listed in the error report, e.g., with ImageMagick's "convert -define png:exclude-chunk=iCCP,zCCP"

  • Use a PNG editor to remove all ancillary chunks, e.g., convert -strip

  • Downgrade your libpng to version 1.5.x (currently libpng-1.5.23)

  • Reinstall libpng-1.6.x (currently libpng-1.6.17) with "-DPNG_sRGB_PROFILE_CHECKS=-1"

  • Find out if there is a way to have your application treat warnings as warnings, not errors, and do that.

like image 81
Glenn Randers-Pehrson Avatar answered Oct 08 '22 19:10

Glenn Randers-Pehrson