toqimage() instead of toqpixmap()

This commit is contained in:
Mauricio 2020-08-03 09:41:51 -04:00
parent cc593bcb48
commit a20b9d5d2d

View File

@ -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