vpi.Image.view
- Image.view(self: vpi.Image, rect: vpi.RectangleI) vpi.Image
Create a view of an existing image.
Create an image view that wraps an axis-aligned rectangular sub-region (or clip-bound region) of an existing image.
Note
The resulting image shares the underlying data with the input image, i.e. there is no copy involved in the creation of a view. Similarly to creating image instances that wrap around external buffers, via
asimage
, the resulting image view instances do not own the data.Hint
It is legal to create a view from another image view instance.
- Parameters
rect (vpi.RectangleI) – The clip-bound region specifies the view start position (x, y) and dimensions (width, height).
- Returns
The image view.
- Return type