Converting from APNG to WebP caused an error about timestamp being a float

This commit is contained in:
Stephen Paul Weber 2023-02-28 00:27:41 -05:00
parent 7e8b11b159
commit 02e7dac367
No known key found for this signature in database
GPG Key ID: D11C2911CE519CDE

View File

@ -285,7 +285,7 @@ def _save_all(im, fp, filename):
# Append the frame to the animation encoder
enc.add(
frame.tobytes("raw", rawmode),
timestamp,
int(timestamp),
frame.size[0],
frame.size[1],
rawmode,
@ -305,7 +305,7 @@ def _save_all(im, fp, filename):
im.seek(cur_idx)
# 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
data = enc.assemble(icc_profile, exif, xmp)