古い質問、良い答えがたくさんありますが、別の選択肢にまだ関心があるかもしれません...
numpngw
最近 github に投稿したモジュール ( https://github.com/WarrenWeckesser/numpngw )は、numpy 配列からアニメーション PNG ファイルを書き込むことができます。(更新:numpngw
現在 pypi にあります: https://pypi.python.org/pypi/numpngw。)
たとえば、このスクリプトは次のとおりです。
import numpy as np
import numpngw
img0 = np.zeros((64, 64, 3), dtype=np.uint8)
img0[:32, :32, :] = 255
img1 = np.zeros((64, 64, 3), dtype=np.uint8)
img1[32:, :32, 0] = 255
img2 = np.zeros((64, 64, 3), dtype=np.uint8)
img2[32:, 32:, 1] = 255
img3 = np.zeros((64, 64, 3), dtype=np.uint8)
img3[:32, 32:, 2] = 255
seq = [img0, img1, img2, img3]
for img in seq:
img[16:-16, 16:-16] = 127
img[0, :] = 127
img[-1, :] = 127
img[:, 0] = 127
img[:, -1] = 127
numpngw.write_apng('foo.png', seq, delay=250, use_palette=True)
作成します:

アニメーションを表示するには、アニメーション PNG (直接またはプラグインを使用) をサポートするブラウザーが必要です。