Skip to content

Commit

Permalink
Fix fps type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Feb 4, 2024
1 parent aada71c commit 762b336
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sticker_convert/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def _frames_export_webp(self):
for frame in self.frames_processed:
pic = webp.WebPPicture.from_numpy(frame)
enc.encode_frame(pic, timestamp_ms, config=config)
timestamp_ms += int(Decimal(1000 / self.fps).quantize(0, ROUND_HALF_UP))
timestamp_ms += int(1000 / self.fps)
anim_data = enc.assemble(timestamp_ms)
self.tmp_f.write(anim_data.buffer())

Expand All @@ -523,7 +523,7 @@ def _frames_export_apng(self):
if self.apngasm == None:
self.apngasm = APNGAsm()

delay_num = int(Decimal(1000 / self.fps).quantize(0, ROUND_HALF_UP))
delay_num = int(1000 / self.fps)
for i in range(0, image_quant.height, self.res_h):
with io.BytesIO() as f:
crop_dimension = (0, i, image_quant.width, i+self.res_h)
Expand Down

0 comments on commit 762b336

Please sign in to comment.