"BGR;15" -> "BGRA;15"

This commit is contained in:
Yay295 2024-04-11 00:53:06 -05:00 committed by Yay295
parent 6f28a0c009
commit 872ff125fc

View File

@ -36,7 +36,7 @@ MODES = {
(3, 1): "1", (3, 1): "1",
(3, 8): "L", (3, 8): "L",
(3, 16): "LA", (3, 16): "LA",
(2, 16): "BGR;15", (2, 16): "BGRA;15",
(2, 24): "BGR", (2, 24): "BGR",
(2, 32): "BGRA", (2, 32): "BGRA",
} }
@ -118,7 +118,7 @@ class TgaImageFile(ImageFile.ImageFile):
start, size, mapdepth = i16(s, 3), i16(s, 5), s[7] start, size, mapdepth = i16(s, 3), i16(s, 5), s[7]
if mapdepth == 16: if mapdepth == 16:
self.palette = ImagePalette.raw( self.palette = ImagePalette.raw(
"BGR;15", b"\0" * 2 * start + self.fp.read(2 * size) "BGRA;15", b"\0" * 2 * start + self.fp.read(2 * size)
) )
elif mapdepth == 24: elif mapdepth == 24:
self.palette = ImagePalette.raw( self.palette = ImagePalette.raw(