vpi.Pyramid.convert
- Pyramid.convert(out: vpi.Image, *, policy: vpi.Conversion = vpi.Conversion.CLAMP, scale: float = 1, offset: float = 0, chroma_up: vpi.Interp = vpi.Interp.NEAREST, chroma_down: vpi.Interp = vpi.Interp.NEAREST, backend: vpi.Backend = vpi.Backend.DEFAULT, stream: vpi.Stream = None) vpi.Image
- Pyramid.convert(format: vpi.Format, *, policy: vpi.Conversion = vpi.Conversion.CLAMP, scale: float = 1, offset: float = 0, chroma_up: vpi.Interp = vpi.Interp.NEAREST, chroma_down: vpi.Interp = vpi.Interp.NEAREST, backend: vpi.Backend = vpi.Backend.DEFAULT, stream: vpi.Stream = None) vpi.Image
Converts image/pyramid to the desired format.
See also
Refer to the algorithm explanation for more details and usage examples.
- Parameters
out (vpi.Image or vpi.Pyramid) – The output image/pyramid with the desired format.
format (vpi.Format) – The output format of the image returned.
policy (vpi.Conversion, optional) – Conversion policy to be used.
scale (float, optional) – Scaling factor. Pass 1 for no scaling.
offset (float, optional) – Offset factor. Pass 0 for no offset.
chroma_up (vpi.Interp, optional) – Interpolation to use for chroma upsampling.
chroma_down (vpi.Interp, optional) – Interpolation to use for chroma downsampling.
backend (vpi.Backend, optional) – The backend to be used by the algorithm.
stream (vpi.Stream, optional) – The stream to be used by the algorithm.
- Returns
The converted image/pyramid.
- Return type
Caution
Restrictions to several arguments may apply. Check the C API references of the submit function and the group concepts for more details.