Skip to content

Commit

Permalink
import frames of apng and png with pillow
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Jan 2, 2024
1 parent 9428ccf commit 090440e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sticker_convert/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ def frames_import(self):
self.frames_import_imageio()

def frames_import_imageio(self):
if self.in_f_ext in '.webp':
# ffmpeg do not support webp decoding (yet)
# ffmpeg do not support webp decoding (yet)
# ffmpeg could fail to decode apng if file is buggy
if self.in_f_ext in ('.webp', '.apng', 'png'):
for frame in iio.imiter(self.in_f, plugin='pillow', mode='RGBA'):
self.frames_raw.append(frame)
return
Expand Down

0 comments on commit 090440e

Please sign in to comment.