23 class ImageBackendAccessor;
80 const peak::ipl::PixelFormat& pixelFormat, uint8_t* buffer,
size_t bufferSize,
size_t width,
size_t height);
155 uint8_t*
Data()
const;
193 size_t outputImageBufferSize,
219 friend ImageBackendAccessor;
231 class ImageBackendAccessor
236 return image.m_backendHandle;
264 static_cast<PEAK_IPL_PIXEL_FORMAT>(pixelFormat.
PixelFormatName()), width, height, &m_backendHandle);
269 const peak::ipl::PixelFormat& pixelFormat, uint8_t* buffer,
size_t bufferSize,
size_t width,
size_t height)
273 static_cast<PEAK_IPL_PIXEL_FORMAT>(pixelFormat.
PixelFormatName()), buffer, bufferSize, width, height,
279 : m_backendHandle(imageHandle)
289 *
this = std::move(other);
297 m_backendHandle = other.m_backendHandle;
298 other.m_backendHandle =
nullptr;
324 uint8_t* pixelPosition =
nullptr;
330 return pixelPosition;
335 size_t byteCount = 0;
349 m_backendHandle, reinterpret_cast<PEAK_IPL_PIXEL_FORMAT*>(&pixelFormatName));
357 uint8_t* data =
nullptr;
370 static_cast<PEAK_IPL_PIXEL_FORMAT>(outputPixelFormat.
PixelFormatName()),
371 static_cast<PEAK_IPL_CONVERSION_MODE>(conversionMode), &outputImageHandle);
374 return ImageBackendAccessor::CreateImage(outputImageHandle);
383 static_cast<PEAK_IPL_PIXEL_FORMAT>(outputPixelFormat.
PixelFormatName()), outputImageBuffer,
384 outputImageBufferSize, static_cast<PEAK_IPL_CONVERSION_MODE>(conversionMode), &outputImageHandle);
387 return ImageBackendAccessor::CreateImage(outputImageHandle);
396 return ImageBackendAccessor::CreateImage(outputImageHandle);
PEAK_IPL_C_API PEAK_IPL_Image_GetData(PEAK_IPL_IMAGE_HANDLE imageHandle, uint8_t **data)
Queries the data pointer of the given image.
PEAK_IPL_C_API PEAK_IPL_Image_GetPixelFormat(PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_PIXEL_FORMAT *pixelFormat)
Queries the pixel format of the given image.
PEAK_IPL_C_API PEAK_IPL_Image_ConvertToBuffer(PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize, PEAK_IPL_CONVERSION_MODE conversionMode, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Stores the data of the current image converted to the given pixel format into a destination buffer an...
#define PEAK_IPL_C_ABI_PREFIX
Definition: peak_ipl_dll_defines.h:16
Image()
Creates an empty image, i.e. with size 0x0 and invalid pixel format.
Definition: peak_ipl_image.hpp:253
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 for...
Definition: peak_ipl_image.hpp:364
PixelFormatName
Enum holding the possible pixel format names.
Definition: peak_ipl_simple_types.hpp:38
size_t ByteCount() const
Returns the size of the given image in number of bytes.
Definition: peak_ipl_image.hpp:333
PEAK_IPL_C_API PEAK_IPL_Image_Clone(PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Returns a new created image containing the data of the current image as deep copy.
The "peak::ipl" namespace contains the whole image processing library.
Definition: peak_ipl_binning.hpp:16
Definition: peak_ipl_backend.h:55
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition: peak_ipl_exception.hpp:128
Stores the pixel format, width and height of an image and the pointer to the image buffer...
Definition: peak_ipl_image.hpp:37
PEAK_IPL_C_API PEAK_IPL_Image_GetHeight(PEAK_IPL_IMAGE_HANDLE imageHandle, size_t *height)
Queries the height of the given image.
ConversionMode
Enum holding the possible conversion modes.
Definition: peak_ipl_simple_types.hpp:28
size_t Height() const
Returns the height.
Definition: peak_ipl_image.hpp:313
PEAK_IPL_C_API PEAK_IPL_Image_GetPixelPointer(PEAK_IPL_IMAGE_HANDLE imageHandle, size_t xPos, size_t yPos, uint8_t **pixelPointer)
Queries the pointer to the given pixel position.
struct PEAK_IPL_IMAGE * PEAK_IPL_IMAGE_HANDLE
Definition: peak_ipl_backend.h:238
PEAK_IPL_C_API PEAK_IPL_Image_ConvertTo(PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, PEAK_IPL_CONVERSION_MODE conversionMode, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Creates a new image containing the data of the current image converted to the given pixel format...
~Image()
Definition: peak_ipl_image.hpp:282
Image Clone() const
Returns a new created image containing the data of the current image as deep copy.
Definition: peak_ipl_image.hpp:390
PEAK_IPL_C_API PEAK_IPL_Image_ConstructFromBuffer(PEAK_IPL_PIXEL_FORMAT pixelFormat, uint8_t *buffer, uint64_t bufferSize, size_t width, size_t height, PEAK_IPL_IMAGE_HANDLE *imageHandle)
Creates an image from a given buffer.
PEAK_IPL_C_API PEAK_IPL_Image_GetWidth(PEAK_IPL_IMAGE_HANDLE imageHandle, size_t *width)
Queries the width of the given image.
uint8_t * Data() const
Returns the pointer to the first pixel position in dependency on the size of the pixel format...
Definition: peak_ipl_image.hpp:355
PEAK_IPL_C_API PEAK_IPL_Image_GetByteCount(PEAK_IPL_IMAGE_HANDLE imageHandle, size_t *byteCount)
Queries the size of the given image in number of bytes.
size_t Width() const
Returns the width.
Definition: peak_ipl_image.hpp:304
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...
Definition: peak_ipl_image.hpp:322
bool Empty() const
Checks whether the image is empty.
Definition: peak_ipl_image.hpp:399
PEAK_IPL_C_API PEAK_IPL_Image_Construct(PEAK_IPL_PIXEL_FORMAT pixelFormat, size_t width, size_t height, PEAK_IPL_IMAGE_HANDLE *imageHandle)
Creates an image.
peak::ipl::PixelFormat PixelFormat() const
Returns the pixel format.
Definition: peak_ipl_image.hpp:343
PEAK_IPL_C_API PEAK_IPL_Image_Destruct(PEAK_IPL_IMAGE_HANDLE imageHandle)
Destroys the image associated with the given handle.
Image & operator=(const Image &other)=delete