class PColourConverter |
This class defines a means to convert an image from one colour format to another.
![]() | PColourConverter ( const PString & srcColourFormat, const PString & dstColourFormat, unsigned width, unsigned height ) Create a new converter. |
![]() | GetVFlipState () Get the video conversion vertical flip state |
![]() | SetVFlipState (BOOL vFlipState) Set the video conversion vertical flip state |
![]() | SetFrameSize ( unsigned width, unsigned height ) Set the frame size to be used. |
![]() | SetSrcFrameSize ( unsigned width, unsigned height ) Set the source frame size to be used. |
![]() | SetDstFrameSize ( unsigned width, unsigned height, BOOL bScale ) Set the destination frame size to be used. |
![]() | GetSrcColourFormat () Get the source colour format |
![]() | GetDstColourFormat () Get the destination colour format |
![]() | GetMaxSrcFrameBytes () Get the maximum frame size in bytes for source frames. |
![]() | GetMaxDstFrameBytes () Get the maximum frame size in bytes for destination frames. |
![]() | Convert ( const BYTE* srcFrameBuffer, BYTE* dstFrameBuffer, PINDEX* bytesReturned = NULL ) Convert from one colour format to another. |
![]() | ConvertInPlace ( BYTE* frameBuffer, PINDEX* bytesReturned = NULL, BOOL noIntermediateFrame = FALSE ) Convert from one colour format to another. |
![]() | Create ( const PString & srcColourFormat, const PString & dstColourFormat, unsigned width, unsigned height ) Create an instance of a colour conversion function. |
![]() | GetDstFrameSize ( unsigned & width, unsigned & height ) const Get the output frame size. |
![]() | GetSrcFrameSize ( unsigned & width, unsigned & height ) const Get the input frame size. |
Run Time Type functions
I/O functions
Comparison functions
This class defines a means to convert an image from one colour format to another. It is an ancestor class for the individual formatting functions.
Default behaviour calls SetSrcFrameSize() and SetDstFrameSize().
Default behaviour sets the srcFrameWidth and srcFrameHeight variables and recalculates the frame buffer size in bytes then returns TRUE if the size was calculated correctly.
Default behaviour sets the dstFrameWidth and dstFrameHeight variables, and the scale / crop preference. It then recalculates the frame buffer size in bytes then returns TRUE if the size was calculated correctly.
Note a particular device may be able to provide variable length frames (eg motion JPEG) so will be the maximum size of all frames.
Note a particular device may be able to provide variable length frames (eg motion JPEG) so will be the maximum size of all frames.
The function should return FALSE if srcFrameBuffer and dstFrameBuffer are the same and that form pf conversion is not allowed
Note that the frame should be large enough to take the destination pixels.
Default behaviour calls Convert() from the frameBuffer to itself, and if that returns FALSE then calls it again (provided noIntermediateFrame is FALSE) using an intermediate store, copying the intermediate store back to the original frame store.
Alphabetic index HTML hierarchy of classes or Java