Skip to content

Commit

Permalink
mode is read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 24, 2023
1 parent d5e330e commit f73325f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PIL/VtfImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ def _open(self):
VtfPF.BGRA8888,
VtfPF.A8,
):
self.mode = "RGBA"
self._mode = "RGBA"
elif pixel_format in (VtfPF.RGB888, VtfPF.BGR888, VtfPF.UV88):
self.mode = "RGB"
self._mode = "RGB"
elif pixel_format == VtfPF.I8:
self.mode = "L"
self._mode = "L"
elif pixel_format == VtfPF.IA88:
self.mode = "LA"
self._mode = "LA"
else:
raise VTFException(f"Unsupported VTF pixel format: {pixel_format}")

Expand Down

0 comments on commit f73325f

Please sign in to comment.