diff --git a/images.py b/images.py index 64e0fa1..8298691 100644 --- a/images.py +++ b/images.py @@ -46,7 +46,7 @@ def load_apng(file): pilframe2.paste(pilframe, (frame_info.x_offset, frame_info.y_offset), pilframe.convert("RGBA") if frame_info.blend_op == APNG_BLEND_OP_OVER else None) pilframes.append(pilframe2) - frames.append([pilframe2.toqpixmap(), frame_info.delay*10]) # convert delay from centiseconds to milliseconds + frames.append([pilframe2.toqimage(), frame_info.delay*10]) # convert delay from centiseconds to milliseconds dispose_op = frame_info.depose_op return frames @@ -58,7 +58,7 @@ def load_webp(file): for i in range(img.n_frames): img.seek(i) img.load() # strange thing with Pillow and animated webp's is that the img.info dictionary attr doesn't update unless you call a function like this - frames.append([img.toqpixmap(), img.info["duration"]]) + frames.append([img.toqimage(), img.info["duration"]]) return frames