WIP: Add R8 integer PNG preview support #2324

Merged
leonida/mandy
ZroIsHere merged 1 commit from fix/dds-png-r8-integer into main 2026-11-26 18:28:49 +00:00

Pull request successfully merged and closed

ZroIsHere commented 2026-11-26 13:47:17 +00:00

Adds PNG previews for DXGI_FORMAT_R8_UINT and DXGI_FORMAT_R8_SINT. UINT channel bytes are preserved as red values; signed values are shifted from [-128, 127] into the PNG byte range [0, 255]. Green and blue remain zero and alpha is opaque. The texture exporter documentation now lists both formats.

DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format

Validation: Python AST parsing and git diff --check passed. No tests were run.

Adds PNG previews for DXGI_FORMAT_R8_UINT and DXGI_FORMAT_R8_SINT. UINT channel bytes are preserved as red values; signed values are shifted from [-128, 127] into the PNG byte range [0, 255]. Green and blue remain zero and alpha is opaque. The texture exporter documentation now lists both formats. DXGI format reference: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format Validation: Python AST parsing and `git diff --check` passed. No tests were run.
aslan2142 commented 2026-11-26 18:29:06 +00:00

Merged through the integration PR #2394 (DDS preview formats batch), as head 4ba0afc2d, with a merge commit, so your commits stay yours.

  • Rename from #2247: your R8_UINT and R8_SINT branches sit in _decode_channels, #2247's new name for _decode_single_channel. The code is the same.
  • Test added: a synthetic test for both formats.

Thanks @ZroIsHere.

AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)

Merged through the integration PR #2394 (DDS preview formats batch), as head `4ba0afc2d`, with a merge commit, so your commits stay yours. - **Rename from #2247:** your R8_UINT and R8_SINT branches sit in `_decode_channels`, #2247's new name for `_decode_single_channel`. The code is the same. - **Test added:** a synthetic test for both formats. Thanks @ZroIsHere. AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Sign in to join this conversation.
No description provided.