mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 13:16:52 +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}"
|
msg = f"Unsupported bitcount {bitcount} for {pfflags}"
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
rawmode = rawmode[::-1]
|
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:
|
elif pfflags & DDPF.LUMINANCE:
|
||||||
if bitcount == 8:
|
if bitcount == 8:
|
||||||
self._mode = "L"
|
self._mode = "L"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user