Skip to content

Commit

Permalink
fix: Support Pillow making mode attribute read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 24, 2023
1 parent 382119a commit 1853be2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pillow_avif/AvifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def _open(self):
self._size = width, height
self.n_frames = n_frames
self.is_animated = self.n_frames > 1
self.mode = self.rawmode = mode
try:
self.mode = self.rawmode = mode
except AttributeError:
self._mode = self.rawmode = mode
self.tile = []

if icc:
Expand Down

0 comments on commit 1853be2

Please sign in to comment.