mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
set palette mode for BGRA;15
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
872ff125fc
commit
e5c6d883d4
|
@ -120,6 +120,7 @@ class TgaImageFile(ImageFile.ImageFile):
|
||||||
self.palette = ImagePalette.raw(
|
self.palette = ImagePalette.raw(
|
||||||
"BGRA;15", b"\0" * 2 * start + self.fp.read(2 * size)
|
"BGRA;15", b"\0" * 2 * start + self.fp.read(2 * size)
|
||||||
)
|
)
|
||||||
|
self.palette.mode = "RGBA"
|
||||||
elif mapdepth == 24:
|
elif mapdepth == 24:
|
||||||
self.palette = ImagePalette.raw(
|
self.palette = ImagePalette.raw(
|
||||||
"BGR", b"\0" * 3 * start + self.fp.read(3 * size)
|
"BGR", b"\0" * 3 * start + self.fp.read(3 * size)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user