[PR #2218] [CLOSED] dds_png: decode R9G9B9E5 shared exponent previews #2223

Closed
opened 2026-11-26 21:20:28 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2218
Author: @ZroIsHere
Created: 11/26/2026
Status: ❌ Closed

Base: main ← Head: fix/dds-png-r9g9b9e5


📝 Commits (1)

  • d36c961 dds_png: decode R9G9B9E5 shared exponent previews

📊 Changes

2 files changed (+35 additions, -4 deletions)

View changed files

📝 tools/dds_png.py (+32 -2)
📝 tools/tex_export.py (+3 -2)

📄 Description

Summary

Add DDS preview decoding for DXGI R9G9B9E5_SHAREDEXP (format 67). Expand each 9-bit channel mantissa using the shared 5-bit biased exponent, clamp RGB to [0, 1], round to 8-bit values, and emit opaque alpha.

Validate row pitch and truncated payloads. Update the tex_export.py help text to include this PNG preview format.

Validation

  • git diff --check
  • Python AST parse
  • Tests not run.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2218 **Author:** [@ZroIsHere](https://github.com/ZroIsHere) **Created:** 11/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/dds-png-r9g9b9e5` --- ### 📝 Commits (1) - [`d36c961`](https://github.com/ubiquitarianism/leonida/commit/d36c961c3e58f9d2a0fec93cf17c8bddcae13fff) dds_png: decode R9G9B9E5 shared exponent previews ### 📊 Changes **2 files changed** (+35 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tools/dds_png.py` (+32 -2) 📝 `tools/tex_export.py` (+3 -2) </details> ### 📄 Description ## Summary Add DDS preview decoding for DXGI R9G9B9E5_SHAREDEXP (format 67). Expand each 9-bit channel mantissa using the shared 5-bit biased exponent, clamp RGB to [0, 1], round to 8-bit values, and emit opaque alpha. Validate row pitch and truncated payloads. Update the `tex_export.py` help text to include this PNG preview format. ## Validation - `git diff --check` - Python AST parse - Tests not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:20:28 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2223
No description provided.