mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 18:36:17 +03:00
Use f-string
Co-authored-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
parent
f1fef09d4a
commit
30eb41475d
|
@ -154,9 +154,7 @@ class DdsImageFile(ImageFile.ImageFile):
|
||||||
self._mode = "RGB"
|
self._mode = "RGB"
|
||||||
mask_count = 3
|
mask_count = 3
|
||||||
|
|
||||||
masks = struct.unpack(
|
masks = struct.unpack(f"<{mask_count}I", header.read(mask_count * 4))
|
||||||
"<" + str(mask_count) + "I", header.read(mask_count * 4)
|
|
||||||
)
|
|
||||||
self.tile = [("dds_rgb", (0, 0) + self.size, 0, (bitcount, masks))]
|
self.tile = [("dds_rgb", (0, 0) + self.size, 0, (bitcount, masks))]
|
||||||
elif pfflags & DDPF_PALETTEINDEXED8:
|
elif pfflags & DDPF_PALETTEINDEXED8:
|
||||||
self._mode = "P"
|
self._mode = "P"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user