DXT3 images are read in RGBA mode by radarhere · Pull Request #8817 · python-pillow/Pillow

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@radarhere

Copy link Copy Markdown

Member

@radarhere radarhere commented

Mar 15, 2025

edited

Loading

https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#dds

Added in version 3.4.0: DXT3 images can be read in RGB mode

This is incorrect. DXT3 images are read in RGBA mode

elif fourcc == D3DFMT.DXT3:
self._mode = "RGBA"

with Image.open(TEST_FILE_DXT3) as im:
im.load()
assert im.format == "DDS"
assert im.mode == "RGBA"

This has been the case since #2068

@hugovk hugovk merged commit eec43cf into python-pillow:main

Mar 17, 2025

5 checks passed

@radarhere radarhere deleted the typo branch

March 17, 2025 21:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@radarhere @hugovk