utils#

mng#

This module provides basic writing Mulitple-image Network Graphics files.

It only supports RGB888 images of the same shape stored as MNG-VLC (very low complexity) format.

convert(images, nb_images=0, fps=25)[source]#

Convert RGB images to MNG-VLC format.

See http://www.libpng.org/pub/mng/spec/ See http://www.libpng.org/pub/png/book/ See http://www.libpng.org/pub/png/spec/1.2/

Parameters:
  • images (iterator of numpy.ndarray of dimension 3) – iterator of RGB888 images

  • nb_images (int) – The number of images indicated in the MNG header

  • fps (int) – The frame rate indicated in the MNG header

Returns:

An iterator of MNG chunks as bytes