Skip to content

Commit

Permalink
ALPHA by itself does not mean bitcount is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 25, 2023
1 parent 2ca9adb commit f58f410
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/PIL/DdsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,6 @@ def _open(self):
msg = f"Unsupported bitcount {bitcount} for {pfflags}"
raise OSError(msg)
rawmode = rawmode[::-1]
elif pfflags & DDPF.ALPHA:
if bitcount == 8:
self._mode = "L"
else:
msg = f"Unsupported bitcount {bitcount} for {pfflags}"
raise OSError(msg)
elif pfflags & DDPF.LUMINANCE:
if bitcount == 8:
self._mode = "L"
Expand Down

0 comments on commit f58f410

Please sign in to comment.