CVB.Net 14.1
PixelFormatConverter Class Reference

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

Inherits INativeHandle.

Public Member Functions

 PixelFormatConverter (PfncFormat sourceFormat, PfncFormat destinationFormat)
 Constructor. More...
 
void Execute< T > (T sourceObject, Image destinationObject)
 Converts a PFNC compliant object to another. sourceObject Data source to be converted. destinationObject Destination object that stores the converted data. T Input object type. More...
 
void Dispose ()
 IDisposable implementation.
 

Static Public Member Functions

static PixelFormatConverter Create (PfncFormat sourceFormat, PfncFormat destinationFormat)
 Creates a pixel format converter. More...
 

Properties

PfncFormat SourceFormat [get]
 Gets the source pixel format.
 
PfncFormat DestinationFormat [get]
 Gets the destination pixel format.
 
IntPtr Handle [get]
 Native handle of the calibrator.
 
bool IsDisposed [get]
 Gets if the native handle has been disposed.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

Helper class that takes care of pixel format conversion.

Constructor & Destructor Documentation

◆ PixelFormatConverter()

PixelFormatConverter ( PfncFormat  sourceFormat,
PfncFormat  destinationFormat 
)

Constructor.

Parameters
sourceFormatSource pixel format.
destinationFormatDestination pixel format.
Exceptions
CvbExceptionWhen an error during converter creation occurs.

Member Function Documentation

◆ Create()

static PixelFormatConverter Create ( PfncFormat  sourceFormat,
PfncFormat  destinationFormat 
)
static

Creates a pixel format converter.

Parameters
sourceFormatSource pixel format.
destinationFormatDestination pixel format.
Returns
Requested pixel format converter.
Exceptions
CvbExceptionWhen an error during converter creation occurs.

◆ Execute< T >()

void Execute< T > ( sourceObject,
Image  destinationObject 
)

Converts a PFNC compliant object to another. sourceObject Data source to be converted. destinationObject Destination object that stores the converted data. T Input object type.

Exceptions
ObjectDisposedException>If the input sourceObject has already been disposed.
ObjectDisposedException>If the input destinationObject has already been disposed.
ArgumentExceptionIf sourceObject is not valid type.
Type Constraints
T :INativeHandle 

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.