用gifs重新缩放的wand.py奇怪的行为

时间:2018-05-19 13:26:32

标签: python imagemagick wand

我想制作逐帧液体重新缩放GIF的脚本,但我坚持这个问题。每次它只是扭曲图像,看起来像以前的框架没有处置。 我使用this答案作为我的脚本的基础:

In [19]: with Image() as result:
    ...:     with Image(filename='file.gif') as source:
    ...:         for frame in source.sequence:
    ...:             x, y = frame.width, frame.height
    ...:             frame.liquid_rescale(x//2, y//2)
    ...:             frame.resize(x, y)
    ...:             result.sequence.append(frame)
    ...:     result.save(filename='res.gif')

这是源图片: http://maxlunar.insomnia247.nl/files/file.gif

我的结果图片: http://maxlunar.insomnia247.nl/files/res.gif

我不知道如何解决这个烂摊子。此外,我计划对内存中的图像进行所有操作(我将它们从URL直接下载到io.BytesIO对象中,这是必需的,因为我打算在多线程应用程序中使用它,因此它应该是线程/进程安全的) 。提前谢谢。

0 个答案:

没有答案