Use constant for uncompressed RGB data check

This commit is contained in:
Andrew Murray 2021-04-12 19:54:01 +10:00
parent 85d009c697
commit 37c9b523b2

View File

@ -130,8 +130,8 @@ class DdsImageFile(ImageFile.ImageFile):
fourcc = header.read(4)
(bitcount,) = struct.unpack("<I", header.read(4))
masks = struct.unpack("<4I", header.read(16))
if pfflags & 0x40:
# DDPF_RGB - Texture contains uncompressed RGB data
if pfflags & DDPF_RGB:
# Texture contains uncompressed RGB data
masks = {mask: ["R", "G", "B", "A"][i] for i, mask in enumerate(masks)}
rawmode = ""
if bitcount == 32: