scallop dome pyformex logo

Previous topic

24. image — Saving OpenGL renderings to image files.

Next topic

26. imagecolor — Using bitmap images as colors.

[FSF Associate Member]

Valid XHTML 1.0 Transitional

25. imagearray — 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.