|
| | ImageConverter () |
| | Constructor for a new ImageConverter instance. More...
|
| |
| | ~ImageConverter () |
| | Destructor for the ImageConverter instance. More...
|
| |
| | ImageConverter (const ImageConverter &other) |
| | Copy Constructor for a new ImageConverter instance. More...
|
| |
| ImageConverter & | operator= (const ImageConverter &other) |
| | Copy assigment for ImageConverter instance. More...
|
| |
| | ImageConverter (ImageConverter &&other) noexcept |
| | Move constructor for ImageConverter instance. More...
|
| |
| ImageConverter & | operator= (ImageConverter &&other) noexcept |
| | Move assignment for ImageConverter instance. More...
|
| |
| | ImageConverter (const peak::ipl::PixelFormat &inputPixelFormat, const peak::ipl::PixelFormat &outputPixelFormat, size_t width, size_t height, size_t imageCount=5) |
| | Convenience constructor to directly pre-allocate an internal buffer pool. This calls PreAllocateConversion internally. More...
|
| |
| void | PreAllocateConversion (const peak::ipl::PixelFormat &inputPixelFormat, const peak::ipl::PixelFormat &outputPixelFormat, size_t width, size_t height, size_t imageCount=5) |
| | Pre-allocate buffer pools needed for the specified conversion. More...
|
| |
| PEAK_IPL_NO_DISCARD peak::ipl::ConversionMode | ConversionMode () const |
| | Returns the current conversion mode. More...
|
| |
| void | SetConversionMode (peak::ipl::ConversionMode conversionMode) |
| | Set conversion mode. More...
|
| |
| PEAK_IPL_NO_DISCARD std::vector< peak::ipl::PixelFormatName > | SupportedOutputPixelFormatNames (const peak::ipl::PixelFormat &inputPixelFormat) const |
| | Returns the supported output pixel formats for a given input pixel format. More...
|
| |
| PEAK_IPL_NO_DISCARD Image | Convert (const Image &inputImage, const peak::ipl::PixelFormat &outputPixelFormat) const |
| | Converts the input image converted to the given pixel format. More...
|
| |
| Image | Convert (const Image &inputImage, const peak::ipl::PixelFormat &outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize) const |
| | Saves the data of the current image converted to the given pixel format into a destination buffer and creates an image from that buffer. More...
|
| |
Converts images from one PixelFormat to another.
- Note
- In order to speed up processing, instances of this class maintain internal memory pools, which allows reuse of memory instead of allocating new memory on each conversion.
The memory is freed when the instance is destroyed. There is one pool for every needed byte count, therefore, a new pool will be allocated if an image with a new size or format needs to be processed.
One may select to create a new instance of this class when changing image settings in order to free old pools. If a new pool or buffer is needed, they will get allocated automatically during the conversion, which results in the first conversion taking more time.
This can be prevented by using the function #ImageConverter::PreAllocateConversion before the conversion. Buffers can be reused once a converted image gets freed.