These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.
optris::ImageInfo
Encapsulates all relevant information about a false color image.
Public functions
ImageInfo
OTC_SDK_API ImageInfo(ColorFormat colorFormat, WidthAlignment widthAlignment) noexcept
Constructor.
Parameters
| Name | Description |
|---|---|
colorFormat |
of the image. |
widthAlignment |
of the image. |
getColorFormat
ColorFormat getColorFormat() const noexcept
Returns the color format of the image.
Returns: color format of the image.
getChannels
int getChannels() const noexcept
Returns the number of color channels.
Returns: number of color channels.
getOffsetRed
int getOffsetRed() const noexcept
Returns the offset of the red color byte.
Returns: offset of the red color byte.
getOffsetGreen
int getOffsetGreen() const noexcept
Returns the offset of the green color byte.
Returns: offset of the green color byte.
getOffsetBlue
int getOffsetBlue() const noexcept
Returns the offset of the blue color byte.
Returns: offset of the blue color byte.
getOffsetAlpha
int getOffsetAlpha() const noexcept
Returns the offset of the alpha byte. Only meaningful for ColorFormat::BGRA; -1 for the three-channel formats, which have no alpha byte.
Returns: offset of the alpha byte, or -1 when there is none.
resize
OTC_SDK_API int resize(int width, int height)
Resizes the image to the given dimension.
Returns: resulting image size in bytes.
getWidth
int getWidth() const noexcept
Returns the image width in pixels.
Returns: image width in pixels.
getStride
int getStride() const noexcept
Returns the image stride in bytes. The stride is the image width in bytes including potential padding.
Returns: image stride in bytes.
getHeight
int getHeight() const noexcept
Returns the image height in pixels.
Returns: image height in pixels.
getSize
int getSize() const noexcept
Returns the image size in pixels.
Returns: image size in pixels.
getWidthAlignment
WidthAlignment getWidthAlignment() const noexcept
Returns the width alignment of the image.
Returns: width alignment of the image.
getWidthPaddingInBytes
int getWidthPaddingInBytes() const noexcept
Returns width padding in bytes.
Returns: width padding in bytes.