Android 5.0后图片报错:libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

报错信息

AAPT err(Facade for 679226480): F:\work-studio\xxx\app\src\main\res\drawable-xhdpi\ic_icon_more.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

解决办法

  1. 首先安装imagemagick

  2. 在图片所在的路径下新建一个bat批处理文件。如:run.bat

  3. run.bat文件内容如下:

set fn=D:\development\ImageMagick-6.9.2-Q16\convert.exe
for /f "tokens=*" %%i in ('dir/s/b *.png') do "%fn%" "%%i" -strip "%%i" pause

**fn的路径为imagemagick安装的路径

  1. 运行bat文件

你可能感兴趣的:(android,图片,sRGB,libpng,iCCP)