CVBpy 15.0
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Modules Pages
PixelFormatConverter Class Reference

Helper class that takes care of pixel format conversion. More...

Inherits object.

Public Member Functions

cvb.PixelFormatConverter create (int source_format, int destination_format)
 Creates a pixel format converter. More...
 
None execute (self, Union[cvb.Image, cvb.PFNCBuffer, cvb.Composite] source_object, cvb.Image destination_object)
 Converts a PFNC compliant object to another pixel format. More...
 

Properties

 destination_format = property
 int: Gets the destination pixel format (see cvb.PfncFormat).
 
 source_format = property
 int: Gets the source pixel format (see cvb.PfncFormat).
 

Detailed Description

Helper class that takes care of pixel format conversion.

Constructor.

Parameters

source_format : int Source pixel format (see cvb.PfncFormat).

destination_format : int Destination pixel format (see cvb.PfncFormat).

Member Function Documentation

◆ create()

cvb.PixelFormatConverter create ( int  source_format,
int  destination_format 
)

Creates a pixel format converter.

Parameters

source_format : int Source pixel format (see cvb.PfncFormat).

destination_format : int Destination pixel format (see cvb.PfncFormat).

Returns

cvb.PixelFormatConverter Requested pixel format converter.

◆ execute()

None execute (   self,
Union[cvb.Image, cvb.PFNCBuffer, cvb.Composite source_object,
cvb.Image  destination_object 
)

Converts a PFNC compliant object to another pixel format.

If any of the given objects is not PFNC compliant then it throws a runtime exception.

Parameters

source_object : Union[cvb.Image, cvb.PFNCBuffer, cvb.Composite] Data source to be converted.

destination_object : cvb.Image Destination object that stores the converted data.