libpng警告:iCCP:已知不正确的sRGB配置文件 [英] libpng warning: iCCP: known incorrect sRGB profile

查看:4139
本文介绍了libpng警告:iCCP:已知不正确的sRGB配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用SDL加载PNG文件,但程序不工作,并且此错误出现在控制台中

I'm trying to load a PNG file using SDL but the program doesn't work and this error appears in the console

libpng警告:iCCP:已知不正确的sRGB配置文件

"libpng warning: iCCP: known incorrect sRGB profile"

为什么会出现此警告?
我应该如何解决这个问题?

Why this warning appears? what should I do to solve this problem?

推荐答案

Libpng-1.6比检查ICC配置文件更严格版本。您可以忽略该警告。要移除它,从PNG图像中删除iCCP块。

Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image.

某些应用程序将警告视为错误;如果你使用这样的应用程序,你必须删除块。您可以使用各种PNG编辑器(例如ImageMagick的 convert in.png out.png )。

Some applications treat warnings as errors; if you are using such an application you do have to remove the chunk. You can do that with any of a variety of PNG editors such as ImageMagick's convert in.png out.png.

要从文件夹(目录)中的所有PNG文件中删除无效的iCCP块,可以使用ImageMagick的 mogrify * .png ,前提是您的ImageMagick是用libpng16 (运行 convert -list format | grep PNG 以确保这一点)。

To remove the invalid iCCP chunk from all of the PNG files in a folder (directory), you can use ImageMagick's mogrify *.png, provided that your ImageMagick was built with libpng16 (run convert -list format | grep PNG to be sure of that).

二进制发布这里

对于Android项目(Android Studio),请转到res文件夹。

For Android Projects (Android Studio) navigate into res folder.

例如:
C:\AndroidProjects\ {your_project_folder} \app\src\main\res\drawable-hdpi\mogrify * .png

这篇关于libpng警告:iCCP:已知不正确的sRGB配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆