Removal of "ICCP known incorrect sRGB profile" warning

Source: Internet
Author: User
Tags imagemagick

This warning is always present when the COCOS2DX game is running. Because there is no effect on the actual game, it has not been managed. Today a little Google, originally the new version of Libpng (1.6.2) on the PNG image inspection more stringent, so there will be this warning.


Workaround:

1, directly change libpng code, this is actually very comfortable, self-compiled libpng library is good. Although a little bit of trouble, but it is not difficult, and once and for all.

And as far as code is concerned, there should be no unnecessary warnings unless the PNG images are displayed abnormally or cross-platform problems occur.

2. Convert PNG images using ImageMagick. Download the ImageMagick here. Then write a script to convert all PNG images.

Import Oscmd = R ' D:\Program files\imagemagick-6.9.0-q16\convert.exe ' source_path = R ' E:\Code\res ' def Dostrip (PATH): data = {};p rint (path) for root, dirs, files in Os.walk (path): For file in files:name = File.lower (); if Name.find ('. png ')! = -1:path = Os.path.join (root, file) Os.system (' "{0}" {1}-strip {1} '. Format (CMD, path, path));d Ostrip (Source_path)

Removal of "ICCP known incorrect sRGB profile" warning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.