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
-
imagearray.qimage2numpy(qimage)
-
imagearray.numpy2qimage(array)
-
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.