### Navigation

- index
- modules |
- next |
- previous |
- pyFormex v0.8.6 documentation >
- pyFormex reference manual >

# 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.

### Navigation

- index
- modules |
- next |
- previous |
- pyFormex v0.8.6 documentation >
- pyFormex reference manual >