24. imagearray — Convert bitmap images into numpy arrays.

Convert bitmap images into numpy arrays.

This module contains functions to convert bitmap images into numpy arrays and vice versa.

Most of this code was borrowed from the PyQwt mailing list

Classes defined in module imagearray

Functions defined in module imagearray

imagearray.gray2qimage(gray)

Convert the 2D numpy array gray into a 8-bit QImage with a gray colormap. The first dimension represents the vertical image axis.

imagearray.rgb2qimage(rgb)

Convert the 3D numpy array rgb into a 32-bit QImage. rgb must have three dimensions with the vertical, horizontal and RGB image axes.

Documentation

Previous topic

23. image — Saving OpenGL renderings to image files.

Next topic

25. imagecolor — Using bitmap images as colors.

This Page