fix(png): add option to exclude cICP chunk from HDR PNG screenshots - #436
Open
Jahbanny wants to merge 4 commits into
Open
fix(png): add option to exclude cICP chunk from HDR PNG screenshots#436Jahbanny wants to merge 4 commits into
Jahbanny wants to merge 4 commits into
Conversation
Jahbanny
force-pushed
the
feature/rec2100pq-icc-update
branch
from
September 4, 2026 19:35
9f2e2ec to
e649cff
Compare
Jahbanny
force-pushed
the
feature/rec2100pq-icc-update
branch
2 times, most recently
from
September 4, 2026 19:41
ba016f1 to
590e087
Compare
Discord has a bug rendering HDR PNGs with a cICP chunk. Instead of permanently removing cICP (which breaks Apple and other non-Chromium viewers that rely on it), keep cICP by default and add an advanced checkbox in Settings > Output to opt out. - Added bool _screenshot_include_cicp (default: true) to runtime.hpp - Added config load/save for SCREENSHOT/IncludeCICP in runtime.cpp - Added 'Include cICP chunk' checkbox in the HDR screenshot format section with tooltip: 'Uncheck to fix image display issues in Discord' - Extended stbi_write_hdr_png_to_func with an include_cicp parameter - Fixed file_size calculation to accurately reflect included chunks
Jahbanny
force-pushed
the
feature/rec2100pq-icc-update
branch
from
September 4, 2026 21:37
8473346 to
25cb3a1
Compare
added 3 commits
September 4, 2026 16:19
…orkaround - Restore iCCP chunk writing in stbi_write_hdr_png_to_func (was removed in prior PR) - iCCP is now always written for BT.2020/PQ, independent of cICP toggle - Rename checkbox to 'Write cICP tag (Discord HDR bug)' in GUI and resource file - Update tooltip to clarify it's a Discord bug workaround
Author
Author
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Discord fails to render HDR PNG screenshots that contain a cICP chunk. This is a bug in Discord's PNG decoder, not a problem with ReShade's output.
Approach
Instead of permanently removing the cICP chunk (which breaks other viewers that depend on it, such as Apple's image viewer), this PR:
Changes
deps/stb_image/stb_image_write_hdr_png.hinclude_cicpparameter; cICP only written when enabled; fixedfile_sizecalculationsource/runtime.hppbool _screenshot_include_cicp = true;source/runtime.cppsource/runtime_gui.cpp