mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
mode is read-only
This commit is contained in:
parent
d5e330e6aa
commit
f73325f780
|
@ -254,13 +254,13 @@ class VtfImageFile(ImageFile.ImageFile):
|
||||||
VtfPF.BGRA8888,
|
VtfPF.BGRA8888,
|
||||||
VtfPF.A8,
|
VtfPF.A8,
|
||||||
):
|
):
|
||||||
self.mode = "RGBA"
|
self._mode = "RGBA"
|
||||||
elif pixel_format in (VtfPF.RGB888, VtfPF.BGR888, VtfPF.UV88):
|
elif pixel_format in (VtfPF.RGB888, VtfPF.BGR888, VtfPF.UV88):
|
||||||
self.mode = "RGB"
|
self._mode = "RGB"
|
||||||
elif pixel_format == VtfPF.I8:
|
elif pixel_format == VtfPF.I8:
|
||||||
self.mode = "L"
|
self._mode = "L"
|
||||||
elif pixel_format == VtfPF.IA88:
|
elif pixel_format == VtfPF.IA88:
|
||||||
self.mode = "LA"
|
self._mode = "LA"
|
||||||
else:
|
else:
|
||||||
raise VTFException(f"Unsupported VTF pixel format: {pixel_format}")
|
raise VTFException(f"Unsupported VTF pixel format: {pixel_format}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user