Stores the pixel format, width and height of an image and the pointer to the image buffer.
More...
#include <peak_ipl/types/peak_ipl_image.hpp>
|
| | Image () |
| | Creates an empty image, i.e. with size 0x0 and invalid pixel format. More...
|
| |
| | Image (const peak::ipl::PixelFormat &pixelFormat, size_t width, size_t height) |
| | Creates an image with the given pixel format and size. More...
|
| |
| | Image (const peak::ipl::PixelFormat &pixelFormat, uint8_t *buffer, size_t bufferSize, size_t width, size_t height) |
| | Creates an image with the given pixel format and size from the given buffer. More...
|
| |
| | ~Image () |
| |
| | Image (const Image &other)=delete |
| |
| Image & | operator= (const Image &other)=delete |
| |
| | Image (Image &&other) noexcept |
| |
| Image & | operator= (Image &&other) noexcept |
| |
| size_t | Width () const |
| | Returns the width. More...
|
| |
| size_t | Height () const |
| | Returns the height. More...
|
| |
| uint8_t * | PixelPointer (size_t xPos, size_t yPos) const |
| | Returns the pixel pointer to the given pixel position in dependency of the size of the pixel format. More...
|
| |
| size_t | ByteCount () const |
| | Returns the size of the given image in number of bytes. More...
|
| |
| peak::ipl::PixelFormat | PixelFormat () const |
| | Returns the pixel format. More...
|
| |
| uint8_t * | Data () const |
| | Returns the pointer to the first pixel position in dependency on the size of the pixel format. More...
|
| |
| Image | ConvertTo (const peak::ipl::PixelFormat &outputPixelFormat, peak::ipl::ConversionMode conversionMode=peak::ipl::ConversionMode::Fast) const |
| | Returns a new created image containing the data of the current image converted to the given pixel format. More...
|
| |
| Image | ConvertTo (const peak::ipl::PixelFormat &outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize, peak::ipl::ConversionMode conversionMode=peak::ipl::ConversionMode::Fast) 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...
|
| |
| Image | Clone () const |
| | Returns a new created image containing the data of the current image as deep copy. More...
|
| |
| bool | Empty () const |
| | Checks whether the image is empty. More...
|
| |
Stores the pixel format, width and height of an image and the pointer to the image buffer.
◆ Image() [1/5]
| peak::ipl::Image::Image |
( |
| ) |
|
|
inline |
Creates an empty image, i.e. with size 0x0 and invalid pixel format.
- Exceptions
-
- Since
- 1.1
◆ Image() [2/5]
Creates an image with the given pixel format and size.
- Parameters
-
| [in] | pixelFormat | The pixel format. |
| [in] | width | The width. |
| [in] | height | The height. |
- Exceptions
-
- Since
- 1.0
◆ Image() [3/5]
| peak::ipl::Image::Image |
( |
const peak::ipl::PixelFormat & |
pixelFormat, |
|
|
uint8_t * |
buffer, |
|
|
size_t |
bufferSize, |
|
|
size_t |
width, |
|
|
size_t |
height |
|
) |
| |
|
inline |
Creates an image with the given pixel format and size from the given buffer.
- Parameters
-
| [in] | pixelFormat | The pixel format. |
| [in] | buffer | The buffer. |
| [in] | bufferSize | The size of the buffer. |
| [in] | width | The width. |
| [in] | height | The height. |
- Note
- The given buffer does not get copied. This is why the buffer must not be freed before the image gets freed.
- Exceptions
-
- Since
- 1.0
◆ ~Image()
| peak::ipl::Image::~Image |
( |
| ) |
|
|
inline |
◆ Image() [4/5]
| peak::ipl::Image::Image |
( |
const Image & |
other | ) |
|
|
delete |
◆ Image() [5/5]
| peak::ipl::Image::Image |
( |
Image && |
other | ) |
|
|
inlinenoexcept |
◆ ByteCount()
| size_t peak::ipl::Image::ByteCount |
( |
| ) |
const |
|
inline |
Returns the size of the given image in number of bytes.
- Returns
- ByteCount
- Exceptions
-
- Since
- 1.0
◆ Clone()
| Image peak::ipl::Image::Clone |
( |
| ) |
const |
|
inline |
Returns a new created image containing the data of the current image as deep copy.
- Returns
- Copied image
- Exceptions
-
- Since
- 1.0
◆ ConvertTo() [1/2]
Returns a new created image containing the data of the current image converted to the given pixel format.
- Parameters
-
| [in] | outputPixelFormat | The output pixel format. |
| [in] | conversionMode | The conversion mode. |
- Returns
- Converted image
- Note
- This function allocates memory on every use. For faster processing consider using ImageConverter::Convert instead.
- Exceptions
-
- Since
- 1.0
◆ ConvertTo() [2/2]
Saves the data of the current image converted to the given pixel format into a destination buffer and creates an image from that buffer.
- Parameters
-
| [in] | outputPixelFormat | The output pixel format. |
| [out] | outputImageBuffer | Pointer to destination buffer. |
| [in] | outputImageBufferSize | Size of destination buffer. |
| [in] | conversionMode | The conversion mode. |
- Returns
- Converted image
- Note
- This function allocates memory on every use. For faster processing consider using ImageConverter::Convert instead.
- Exceptions
-
- Since
- 1.1
◆ Data()
| uint8_t * peak::ipl::Image::Data |
( |
| ) |
const |
|
inline |
Returns the pointer to the first pixel position in dependency on the size of the pixel format.
- Returns
- Buffer data.
- Exceptions
-
- Since
- 1.0
◆ Empty()
| bool peak::ipl::Image::Empty |
( |
| ) |
const |
|
inline |
Checks whether the image is empty.
An image can be empty if its data have been moved.
- Returns
- True if image is empty
- Since
- 1.0
◆ Height()
| size_t peak::ipl::Image::Height |
( |
| ) |
const |
|
inline |
Returns the height.
- Returns
- Height
- Exceptions
-
- Since
- 1.0
◆ operator=() [1/2]
| Image& peak::ipl::Image::operator= |
( |
const Image & |
other | ) |
|
|
delete |
◆ operator=() [2/2]
| Image & peak::ipl::Image::operator= |
( |
Image && |
other | ) |
|
|
inlinenoexcept |
◆ PixelFormat()
Returns the pixel format.
- Returns
- Pixel format
- Exceptions
-
- Since
- 1.0
◆ PixelPointer()
| uint8_t * peak::ipl::Image::PixelPointer |
( |
size_t |
xPos, |
|
|
size_t |
yPos |
|
) |
| const |
|
inline |
Returns the pixel pointer to the given pixel position in dependency of the size of the pixel format.
- Parameters
-
| [in] | xPos | The x position. |
| [in] | yPos | The y position. |
- Returns
- PixelPointer
- Exceptions
-
- Since
- 1.0
◆ Width()
| size_t peak::ipl::Image::Width |
( |
| ) |
const |
|
inline |
Returns the width.
- Returns
- Width
- Exceptions
-
- Since
- 1.0
The documentation for this class was generated from the following file: