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)

 

    

你可能感兴趣的:(profile)