mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
ALPHA by itself does not mean bitcount is valid
This commit is contained in:
parent
2ca9adb79d
commit
f58f410b21
|
@ -368,12 +368,6 @@ class DdsImageFile(ImageFile.ImageFile):
|
|||
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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user