class
CompressedImageView2DTwo-dimensional compressed image view
Memory ownership and reference counting
Similarly to corrade.containers.ArrayView (and unlike in C++), the
view keeps a reference to the original memory owner object in the
owner field, meaning that calling del
on the original object
will not invalidate the view. Slicing a view creates a new view
referencing the same original object, without any dependency on the
previous view. That means a long chained slicing operation will not cause
increased memory usage.
The owner is None
if the view is empty.
Special methods
- def __init__(self, arg0: CompressedPixelFormat, arg1: Vector2i, /) -> None
- Construct an empty view
- def __init__(self, arg0: CompressedPixelFormat, arg1: Vector2i, arg2: corrade.containers.ArrayView, /) -> None
- Constructor
- def __init__(self, arg0: CompressedImage2D, /) -> None
- Construct a view on an image
- def __init__(self, arg0: CompressedImageView2D, /) -> None
- Construct from any type convertible to an image view
- def __init__(self, arg0: MutableCompressedImageView2D, /) -> None
- Construct from a mutable view
Properties
- data: corrade.containers.ArrayView get set
- Raw image data
- format: CompressedPixelFormat get
- Format of compressedpixel data
- owner: object get
- Memory owner
- size: Vector2i get
- Image size
Method documentation
def magnum. CompressedImageView2D. __init__(self,
arg0: CompressedImageView2D, /) -> None
Construct from any type convertible to an image view
Exceptions | |
---|---|
RuntimeError | If trade.ImageData2D.is_compressed is
False |
This function is used to implement implicit conversion from trade.ImageData2D in the trade module.