1
所以我有一个系列透明PNG图像,并将它们添加到一个新的图像()魔杖:如何安装透明的gif /清晰的背景每一帧
with Image() as new_gif:
for img_path in input_images:
with Image(filename=img_path) as inimg:
# create temp image with transparent background to composite
with Image(width=inimg.width, height=inimg.height, background=None) as new_img:
new_img.composite(inimg, 0, 0)
new_gif.sequence.append(new_img)
new_gif.save(filename=output_path)
遗憾的背景是不是“清除”当新图像被追加。他们将有最后的图像有作为:
但是我怎么清除背景?我虽然我通过合成一个新的图像前期完成。`:| HALP!
我看到有一个similar东西与命令行ImageMagick但魔杖没有这样的东西。到目前为止,我必须用适合的背景色来解决问题。
嗯不起作用。我想我删除了原始图像:/但是,如果您查看我发布^的图像,例如通过'xnview',您可以逐步浏览单个图像** Shift + PgDown/PgUp **,并且看到它们实际上没有轨道存储!我首先想到的是它们是如何放在一起,而不是它们如何渲染...... – ewerybody
当然,它全部与命令行imageMagick和'-dispose background'一起使用。哦,该死。我希望它变得很好,pythonic ......:| – ewerybody
啊!我知道了。我们需要直接通过C-API构建动画 – emcconville