pyface.array_image module

pyface.array_image.ImageArray = Array(shape=(None, None, (3, 4)), dtype='uint8')

Trait type for image arrays.

class pyface.array_image.ArrayImage(data, **traits)[source]

Bases: HasStrictTraits

An IImage stored in an RGB(A) numpy array.

data = ImageArray()

The bytes of the image.

create_image(size=None)[source]

Creates a toolkit-specific image for this array.

Parameters

size ((int, int) or None) – The desired size as a width, height tuple, or None if wanting default image size.

Returns

image – The toolkit image corresponding to the image and the specified size.

Return type

toolkit image

create_bitmap(size=None)[source]

Creates a toolkit-specific bitmap image for this array.

Parameters

size ((int, int) or None) – The desired size as a width, height tuple, or None if wanting default image size.

Returns

image – The toolkit bitmap corresponding to the image and the specified size.

Return type

toolkit bitmap

create_icon(size=None)[source]

Creates a toolkit-specific icon for this array.

Parameters

size ((int, int) or None) – The desired size as a width, height tuple, or None if wanting default icon size.

Returns

image – The toolkit image corresponding to the image and the specified size as an icon.

Return type

toolkit icon