-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Examples: Remove broken iCCP chunks in some PNG files. #28564
Conversation
The profiles are not honored in three.js, but FWIW, the normal and roughness texture files are assumed to be encoded with a linear transfer function -- not sRGB. |
What other colorspaces does iCCP support? |
Yes, I think the loader read the image as is, and this PR or the sRGB profile would not affect it. three.js/examples/webgpu_clearcoat.html Line 91 in ec0f9f8
Any. On the Internet, most of pictures use sRGB colorspace, and sRGB is the default colorspace for images not annotated with colorspace information1. Recently, Display-P3 photos account for a certain proportion. I see Three.js has a wide-gamut example to test Display-P3 colorspace2. Footnotes
|
In this case, can't we just remove the iCCP chunks from both png files? I don't understand the value of adding meta data when they are ignored anyway. |
The modified PNG files had broken iCCP chunks (CRC32 check failed). All iCCP chunks in the image files are removed. They are data encoded in textures, so the normal sRGB iCCP chunks are also be removed.
255e868
to
2a754f7
Compare
@Mugen87 What you said is very reasonable. Now all iCCP chunks are removed. You can use pnginfo.py in this repo to verify it. For example, for Before:
Now:
|
The modified PNG files had broken iCCP chunks (CRC32 check failed).
All iCCP chunks in the image files are removed.
They are data encoded in textures, so the normal sRGB iCCP chunks are
also be removed.