enaml.image

Classes

Image An object representing an image.
class enaml.image.Image[source]

Bases: atom.atom.Atom

An object representing an image.

Once an image is created it should be treated as read only. User code should create a new image object if the parameters need to be changed.

format

The format of the image. By default, the consumer of the image will probe the header to automatically infer a type. Base64 images need to be decoded using the base64.b64decode function from the standard library.

raw_size

The (width, height) raw size of the image. This must be provided for images where the size is not encoded in the data stream.

size

The (width, height) size of the image. An invalid size indicates that the size of the image should be automatically inferred. A valid size indicates that the toolkit image should be scaled to the specified size.

aspect_ratio_mode

The aspect ratio mode to use when the toolkit scales the image.

transform_mode

The transform mode to use when the toolkit scales the image.

data

The bytestring holding the data for the image.