
Public Member Functions | |
| np.ndarray | to_numpy_array (self, bool copy=True) |
| Returns the image data as a NumPy array. | |
| memoryview | to_memoryview (self) |
| Return a zero-copy memoryview of the image data. | |
| PixelFormat | pixel_format (self) |
| Returns the pixel format of the image. | |
| Size | size (self) |
| Returns the image dimensions as a Size object. | |
| int | width (self) |
| Returns the width of the image in pixels. | |
| int | height (self) |
| Returns the height of the image in pixels. | |
| Metadata | metadata (self) |
| Returns the metadata object which can be used to retrieve or set metadata belonging to the image. | |
Interface for viewing image pixel data from arbitrary sources, for example a camera buffer.
Definition at line 13 of file iimageview.py.
| int height | ( | self | ) |
Returns the height of the image in pixels.
Definition at line 82 of file iimageview.py.
| Metadata metadata | ( | self | ) |
Returns the metadata object which can be used to retrieve or set metadata belonging to the image.
Definition at line 91 of file iimageview.py.
| PixelFormat pixel_format | ( | self | ) |
Returns the pixel format of the image.
Definition at line 55 of file iimageview.py.
| Size size | ( | self | ) |
Returns the image dimensions as a Size object.
Definition at line 64 of file iimageview.py.
| memoryview to_memoryview | ( | self | ) |
Return a zero-copy memoryview of the image data.
The returned memoryview provides direct access to the underlying image data without copying data. Modifying the memoryview will modify the image data itself. Ensure that the image view and its underlying buffer remain valid before accessing or using the memoryview.
Definition at line 41 of file iimageview.py.
| np.ndarray to_numpy_array | ( | self, | |
| bool | copy = True ) |
Returns the image data as a NumPy array.
By default, the data is copied. Setting copy=False makes the array share memory with the internal buffer, so any changes to the array will be reflected in the image data.
The dimensionality of the returned NumPy array varies according to the pixel format:
| copy | Whether to copy the data. Default is True. |
Definition at line 22 of file iimageview.py.
| int width | ( | self | ) |
Returns the width of the image in pixels.
Definition at line 73 of file iimageview.py.