Welcome to Python-flavored Magnum! Please note that, while already being rather stable, this functionality is still considered experimental and some APIs might get changed without preserving full backwards compatibility.

magnum.trade.ImageData2D class

Two-dimensional image data

Contents

Similarly to Image2D, holds its own data buffer, thus doesn’t have an equivalent to ImageView2D.owner. Implicitly convertible to ImageView2D / MutableImageView2D, so all APIs consuming image views work with this type as well.

Properties

data: corrade.containers.MutableArrayView get
Image data
format: PixelFormat get
Format of pixel data
is_compressed: bool get
Whether the image is compressed
pixel_size: int get
Pixel size (in bytes)
pixels: corrade.containers.MutableStridedArrayView3D get
View on pixel data
size: Vector2i get
Image size
storage: PixelStorage get
Storage of pixel data

Property documentation

magnum.trade.ImageData2D.format: PixelFormat get

Format of pixel data

Exceptions
AttributeError If is_compressed is True

magnum.trade.ImageData2D.pixel_size: int get

Pixel size (in bytes)

Exceptions
AttributeError If is_compressed is True

magnum.trade.ImageData2D.pixels: corrade.containers.MutableStridedArrayView3D get

View on pixel data

Exceptions
AttributeError If is_compressed is True

magnum.trade.ImageData2D.storage: PixelStorage get

Storage of pixel data

Exceptions
AttributeError If is_compressed is True