warning:iCCP:known incorrect sRGB profile

这个警告是因为png图片的不兼容问题,安装ImageMagick,然后写一个py脚本,转换下png图片即可,脚本内容如下:

import os

CMD = r‘C:\Program Files\ImageMagick-6.9.1-Q16\convert.exe‘       #所安装ImageMagick的convert.exe所在目录
SOURCE_PATH = r‘C:\effect2\resource‘                              #图片所在目录

def doStrip(path):
  data = {};
  print(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));

doStrip(SOURCE_PATH)
时间: 2024-10-11 10:25:45

warning:iCCP:known incorrect sRGB profile的相关文章

解决cocos2dx在Xcode中运行时报:convert: iCCP: known incorrect sRGB profile 的问题

本文的实践来源是参照了两个帖子完成的: http://discuss.cocos2d-x.org/t/cocos2d-x-3-0-and-libpng/12451. http://www.myexception.cn/image/462530.html, 感谢以上作者的分享... 以前每次运行cocos2dx 的程序时总是报警告:convert: iCCP: known incorrect sRGB profile, 今天来解决一下... 要解决这个问题需要在终端(Mac)运行 ImageMag

"iccp known incorrect srgb profile" 警告的去除

cocos2dx游戏在运行的时候总是出现这个警告.因为不会对实际游戏造成影响,所以就一直没有管.今天稍微google了下,原来是新版本的libpng(1.6.2之后)对png图片的检查更加严格了,所以会有这个warning. 解决方法: 1.直接改libpng的代码,这个其实很安逸,自己重新编译一下libpng的库就好了.虽然稍微麻烦了一点点,但是一点都不困难,而且一劳永逸. 而且就代码来说,除非导致png图片显示异常或者跨平台出现问题,否则都不应该莫名其妙的出现不必要的警告. 2.使用Imag

python程序报"iccp known incorrect srgb profile" 警告

下载ImageMagick.然后写个脚本转换所有png图片. import os CMD = r'C:\Program Files\ImageMagick-6.9.1-Q16\convert.exe' #ImageMagick安装目录下convert.exe所在目录 SOURCE_PATH = r'C:\effect2\resource' #png图片所在目录 def doStrip(path): data = {}; print(path) for root, dirs, files in o

libpng warning:iCCP:known incorrect sRGB profile

原因是新版的libpng增强了检查,发出警告.此警告可以忽略.若要消除此警告则要使用v4的色彩配置.GIMP sRGB v4 色彩配置,修改当前图片的色彩配置,设为默认. sRGB profilesOn this page you will find several different types of sRGB profiles, with information about their intended use. sRGB v4 PreferencesRGB v4 AppearancesRG

修改libpng库源码解决libpng warning: iCCP: known incorrect

下载libpng源码 wget https://sourceforge.net/projects/libpng/files/libpng16/1.6.36/libpng-1.6.36.tar.xz 修改png.c文件 if (png_sRGB_checks[i].is_broken != 0) { /* These profiles are known to have bad data that may cause * problems if they are used, therefore a

Android Studio:libpng warning: iCCP: Not recognizing known sRGB profile that has been edited解决办法

把以前的eclipse的项目导入Android Studio中,Build项目的时候,出现了一堆错误. 如下: 1 AAPT err(Facade for 1944774242): ERROR: 9-patch image D:\workspace_training\MobileSafe\res\drawable-hdpi\call_locate_blue.9.png malformed. 2 AAPT err(Facade for 1944774242): Frame pixels must

【Xamarin报错】libpng warning : iCCP: Not recognizing known sRGB profile that has been edited

报错: Xamarin Android 编译时发生以下错误: libpng warning : iCCP: Not recognizing known sRGB profile that has been edited 解决: 把android项目下的resource下面的png图片,双击打开,简单编辑保存一下,就OK了. 参考: Here’s a way to resolve the issue within Visual Studio (I'm using VS2015) on a file

android studio问题-ICCP:Not recognizing known sRGB profile

转:http://my.oschina.net/1pei/blog/479162 PNG格式:每个PNG文件是由一个PNG标识(signature),后面跟一些数据块(chunk),每个chunk由 一个chunk类型来标识其功能. 摘要 本文解决了Android Studio 1.2.2下编译期间出现的libpng warning: iCCP: Not recognizing known sRGB profile that has been edited警告问题. 目录[-] 1. 问题描述

zz iCCP: Not recognizing known sRGB profile that has been edited错误

http://my.oschina.net/1pei/blog/479162#OSC_h3_15 http://blog.csdn.net/lzpdz/article/details/50112485 在Android5.0的源码中编译apk会出现如下的问题 libpng warning: "iCCP: Not recognizing known sRGB profile that has been edited" 原因是新版本的libpng对关于ICCP采用了更严苛的约束 解决方法有