Helper class that takes care of pixel format conversion. More...
#include <cvb/pixel_format_converter.hpp>
Public Member Functions | |
| PixelFormatConverter (PfncFormat sourceFormat, PfncFormat destinationFormat) | |
| Constructor. More... | |
| void * | Handle () const noexcept |
| Classic API handle. More... | |
| Cvb::PfncFormat | SourceFormat () const noexcept |
| Gets the source pixel format. More... | |
| Cvb::PfncFormat | DestinationFormat () const noexcept |
| Gets the destination pixel format. More... | |
| template<class T > | |
| void | Execute (const T &sourceObject, Image &destinationObject) |
| Converts a PFNC compliant object to another. More... | |
Static Public Member Functions | |
| static std::unique_ptr< PixelFormatConverter > | Create (PfncFormat sourceFormat, PfncFormat destinationFormat) |
| Creates a pixel format converter. More... | |
Helper class that takes care of pixel format conversion.
|
inline |
Constructor.
| [in] | sourceFormat | Source pixel format. |
| [in] | destinationFormat | Destination pixel format. |
| Any | exception derived from std::exception including CvbException. |
Instantiates a converter object that converts source pixel format image to destination pixel format image.
|
inlinestatic |
Creates a pixel format converter.
| [in] | sourceFormat | Source pixel format. |
| [in] | destinationFormat | Destination pixel format. |
| Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Gets the destination pixel format.
| Does | not throw any exception. |
|
inline |
Converts a PFNC compliant object to another.
| [in] | sourceObject | Data source to be converted. |
| [out] | destinationObject | Destination object that stores the converted data. |
| T | Input object type. |
| Any | exception derived from std::exception including CvbException. |
Note that the source object must implement IPFNCBuffer class, and both arguments must follow the converter's pixel format configuration.
|
inlinenoexcept |
Classic API handle.
| Does | not throw any exception. |
It is normally not necessary to work with this handle.
|
inlinenoexcept |
Gets the source pixel format.
| Does | not throw any exception. |