Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 屏蔽 "libpng warning: iCCP: known incorrect sRGB profile" 警告 #158

Merged

Conversation

yixy-only
Copy link
Collaborator

  1. 加载 PNG 图片时很可能会在控制台中弹出大批量的 "libpng warning: iCCP: known incorrect sRGB profile" 警告,十分影响控制条输入输出、调试和阅读。

  2. 各个浏览器、图像软件的做法一般都是直接忽略颜色空间信息以 sRGB 颜色空间进行显示。

  3. 图像软件在保存时,有时会嵌入颜色空间信息,一般都是各自默认的颜色空间,这些颜色空间其实都是 sRGB。作为专业的图像处理软件,肯定考虑到了 PNG 图像在各个软件中显示的问题。由图像软件生成的图像有很大的可能会在这个图像软件上再次编辑,这个颜色空间在该软件中就是最正确的,没必要让用户进行修改,否则图像软件可能还会提示让用户转换回该软件默认的颜色空间。

根据官方手册中提供的方法 (libpng-manual) 进行屏蔽。

@yixy-only yixy-only self-assigned this Apr 29, 2024
@yixy-only yixy-only merged commit d0d2eb9 into wysaid:master Apr 30, 2024
1 check passed
@yixy-only yixy-only deleted the chore_disable_libpng_incorrect_sRGB_warning branch April 30, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants