This module defines functions to transform images into QPixmaps

image.gui.pixmap.to_img(img, scalar_type=None, lut=None, forceNativeLut=None)[source]

Transform an image array into a QImage

Parameters:
-img (NxMx3 or 4 array of int) - 2D matrix of RGB(A) image pixels

i will correspond to y and j to x with origin in the top left corner

Returns Type:

QImage

image.gui.pixmap.to_img_fast(img, scalar_type=None, lut=None, forceNativeLut=False)[source]

Transform an image array into a QImage.

The implementation tries to minimize data copies and casting by determining the exact flags for QImage and feeding it with the data pointer.

Returns Type:QImage
image.gui.pixmap.to_pix(img, scalar_type=None, lut=None, forceNativeLut=False)[source]

Transform an image array into a QPixmap

Parameters:
-img (NxMx3 or 4 array of int) - 2D matrix of RGB(A) image pixels

i will correspond to x and j to y

Returns Type:

QPixmap

image.gui.pixmap.to_tex(img)[source]

Transform an image array into an array usable for texture in opengl

Parameters:
-img (NxMx3 or 4 array of int) - 2D matrix of RGB(A) image pixels

i will correspond to y and j to x with origin in the top left corner

Returns Type:

NxMx4 array of uint8

This Page