scallop dome pyformex logo

Previous topic

25. imagearray — Convert bitmap images into numpy arrays.

Next topic

27. imageViewer — A general image viewer

[FSF Associate Member]

Valid XHTML 1.0 Transitional

26. imagecolor — Using bitmap images as colors.

This module contains functions to use bitmap images as colors on a pyFormex geometry.

Classes defined in module imagecolor

Functions defined in module imagecolor

imagecolor.image2glcolor(im, flip=True)

Convert a bitmap image to corresponding OpenGL colors.

im is a QImage or any data from which a QImage can be initialized. The image RGB colors are converted to OpenGL colors. The return value is a (w,h,3) shaped array of values in the range 0.0 to 1.0. By default the image is flipped upside-down because the vertical OpenGL axis points upwards, while bitmap images are stored downwards.