0

so i'm using appcelerator studio, and when i run a build i get a bunch of libpng warnings about iccp

i'd very much like these warnings to go away - i don't know how.

i'm running a vanilla windows 10 build, so while i'm happy to do "stuff" to fix the hundreds of images that trigger the warning, i'd really like step-by-step, uh, steps to do so.

if on the other hand there is a simple way to tell appcelerator studio to stop using libpng 1.6 (or somehow downgrade to libpng 1.5?) that would be swell

or just tell appcelerator studio to ignore warnings - that would be neat too.

anything i can do is most welcome.

see this question for more details than i gave about the issue!

Community
  • 1
  • 1
bharal
  • 15,461
  • 36
  • 117
  • 195

2 Answers2

2

To fix the PNG files, you can use any libpng16 application to read them and rewrite them. You'll get the warnings once during this operation but not when you reread them later. You can use ImageMagick's "convert", GraphicsMagick's "gm convert", pngcrush (disclaimer, I wrote pngcrush), or any other PNG editor built with libpng16.

To suppress the libpng16 warnings about sRGB profiles without fixing the PNG files: if you can rebuild the application, add this line to the application source:

png_set_option(read_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);

or you can rebuild libpng16 with the configure option

CPPFLAGS=-DPNG_sRGB_PROFILE_CHECKS=-1
Glenn Randers-Pehrson
  • 11,940
  • 3
  • 37
  • 61
  • argh, thanks for this. i ended up just getting ImageMagick and CygWin and then just looped thru all my images and ran a convert. Bit of a pain, and I'm unsure why the appcelerator team decided to let that error go thru as fatal. Oh well. – bharal Dec 02 '15 at 08:19
1

This is likely because it's a project you created in Titanium 3.x or older and now run with Titanium 4.x or later, am I correct?

In 4.x we switched to use the Material Design theme which no longer uses PNGs but color palettes. Read about the change in the release notes and docs.

Fokke Zandbergen
  • 3,866
  • 1
  • 11
  • 28