Skip to content

Commit 144c040

Browse files
committed
Simplify Python code by receiving tuple from C, as per python-pillow#8740
1 parent e1509ee commit 144c040

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/PIL/AvifImagePlugin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ def _open(self) -> None:
7777
)
7878

7979
# Get info from decoder
80-
width, height, n_frames, mode, icc, exif, exif_orientation, xmp = (
80+
self._size, n_frames, mode, icc, exif, exif_orientation, xmp = (
8181
self._decoder.get_info()
8282
)
83-
self._size = width, height
8483
self.n_frames = n_frames
8584
self.is_animated = self.n_frames > 1
8685
self._mode = mode

src/_avif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ _decoder_get_info(AvifDecoderObject *self) {
743743
}
744744

745745
ret = Py_BuildValue(
746-
"IIIsSSIS",
746+
"(II)IsSSIS",
747747
image->width,
748748
image->height,
749749
decoder->imageCount,

0 commit comments

Comments
 (0)