Skip to content

Commit

Permalink
Set tile args to None
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 13, 2024
1 parent 2783098 commit 299be3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PIL/AvifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def load(self) -> Image.core.PixelAccess | None:
if self.fp and self._exclusive_fp:
self.fp.close()
self.fp = BytesIO(data)
self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 0, self.mode)]
self.tile = [ImageFile._Tile("raw", (0, 0) + self.size, 0, None)]

return super().load()

Expand Down Expand Up @@ -172,7 +172,7 @@ def _save(
advanced = info.get("advanced")
if isinstance(advanced, dict):
advanced = tuple([k, v] for (k, v) in advanced.items())
if advanced is not None:
elif advanced is not None:
try:
advanced = tuple(advanced)
except TypeError:
Expand All @@ -186,7 +186,7 @@ def _save(
)
raise ValueError(msg)
advanced = tuple(
[(str(k).encode("utf-8"), str(v).encode("utf-8")) for k, v in advanced]
(str(k).encode("utf-8"), str(v).encode("utf-8")) for k, v in advanced
)

# Setup the AVIF encoder
Expand Down

0 comments on commit 299be3f

Please sign in to comment.