mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Use Image.getim() instead of ImagingCore.ptr
This commit is contained in:
parent
4d271c8ec8
commit
d1f40a94ff
|
@ -239,7 +239,6 @@ def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
|||
|
||||
for idx in range(nfr):
|
||||
ims.seek(idx)
|
||||
ims.load()
|
||||
|
||||
# Make sure image mode is supported
|
||||
frame = ims
|
||||
|
@ -248,7 +247,7 @@ def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
|||
|
||||
# Append the frame to the animation encoder
|
||||
enc.add(
|
||||
frame.im.ptr,
|
||||
frame.getim(),
|
||||
round(timestamp),
|
||||
lossless,
|
||||
quality,
|
||||
|
@ -296,7 +295,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
|||
im = im.convert("RGBA" if im.has_transparency_data else "RGB")
|
||||
|
||||
data = _webp.WebPEncode(
|
||||
im.im.ptr,
|
||||
im.getim(),
|
||||
lossless,
|
||||
float(quality),
|
||||
float(alpha_quality),
|
||||
|
|
Loading…
Reference in New Issue
Block a user