mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-12 16:24:45 +03:00
Converting from APNG to WebP caused an error about timestamp being a float
This commit is contained in:
parent
7e8b11b159
commit
02e7dac367
|
@ -285,7 +285,7 @@ def _save_all(im, fp, filename):
|
||||||
# Append the frame to the animation encoder
|
# Append the frame to the animation encoder
|
||||||
enc.add(
|
enc.add(
|
||||||
frame.tobytes("raw", rawmode),
|
frame.tobytes("raw", rawmode),
|
||||||
timestamp,
|
int(timestamp),
|
||||||
frame.size[0],
|
frame.size[0],
|
||||||
frame.size[1],
|
frame.size[1],
|
||||||
rawmode,
|
rawmode,
|
||||||
|
@ -305,7 +305,7 @@ def _save_all(im, fp, filename):
|
||||||
im.seek(cur_idx)
|
im.seek(cur_idx)
|
||||||
|
|
||||||
# Force encoder to flush frames
|
# Force encoder to flush frames
|
||||||
enc.add(None, timestamp, 0, 0, "", lossless, quality, 0)
|
enc.add(None, int(timestamp), 0, 0, "", lossless, quality, 0)
|
||||||
|
|
||||||
# Get the final output from the encoder
|
# Get the final output from the encoder
|
||||||
data = enc.assemble(icc_profile, exif, xmp)
|
data = enc.assemble(icc_profile, exif, xmp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user