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

An owning counterpart to ImageView2D / MutableImageView2D. Holds its own data buffer, thus doesn’t have an equivalent to ImageView2D.owner. The data and pixels views allow mutable access. 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
Raw image data
format: PixelFormat get
Format of pixel data
pixel_size: int get
Pixel size (in bytes)
pixels: corrade.containers.MutableStridedArrayView2D get
Pixel data
size: Vector2i get
Image size
storage: PixelStorage get
Storage of pixel data