Skip to content

DXT3 images are read in RGBA mode #8817

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Mar 15, 2025

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants