Skip to content

Commit

Permalink
Pass size as tuple to C, as per python-pillow#8733
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 7, 2025
1 parent 3d22733 commit 8b8d2a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/PIL/AvifImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ def _save(

# Setup the AVIF encoder
enc = _avif.AvifEncoder(
im.size[0],
im.size[1],
im.size,
subsampling,
quality,
speed,
Expand Down Expand Up @@ -260,8 +259,7 @@ def _save(
enc.add(
frame.tobytes("raw", rawmode),
frame_dur,
frame.size[0],
frame.size[1],
frame.size,
rawmode,
is_single_frame,
)
Expand Down
4 changes: 2 additions & 2 deletions src/_avif.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ AvifEncoderNew(PyObject *self_, PyObject *args) {

if (!PyArg_ParseTuple(
args,
"IIsiiissiiOOy*y*iy*O",
"(II)siiissiiOOy*y*iy*O",
&width,
&height,
&subsampling,
Expand Down Expand Up @@ -479,7 +479,7 @@ _encoder_add(AvifEncoderObject *self, PyObject *args) {

if (!PyArg_ParseTuple(
args,
"z#IIIsO",
"z#I(II)sO",
(char **)&rgb_bytes,
&size,
&duration,
Expand Down

0 comments on commit 8b8d2a6

Please sign in to comment.