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.Image2D class

Two-dimensional image

Contents

An owning counterpart to ImageView2D / MutableImageView2D. 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.

Special methods

def __init__(self, arg0: PixelStorage, arg1: PixelFormat, /) -> None
Construct an image placeholder
def __init__(self, arg0: PixelFormat, /) -> None
Construct an image placeholder

Properties

data: corrade.containers.MutableArrayView get
Image data
format: PixelFormat get
Format of pixel data
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