Imaging Control 4 C++ Library 1.0.0
Loading...
Searching...
No Matches
ImageType Struct Reference

Represents an image type, including pixel format and image dimensions. More...

Public Member Functions

 ImageType () noexcept
 Constructs an invalid image type.
 
 ImageType (PixelFormat pixel_format) noexcept
 Constructs an image type, specifying only a pixel format.
 
 ImageType (PixelFormat pixel_format, uint32_t width, uint32_t height) noexcept
 Constructs an image type, specifying pixel format, width and height.
 
PixelFormat pixel_format () const noexcept
 Returns the pixel format of this image type.
 
uint32_t width () const noexcept
 Returns the width of this image type.
 
uint32_t height () const noexcept
 Returns the height of this image type.
 
bool operator== (const ImageType &op2) const noexcept
 Checks whether two image types are equal.
 
bool operator!= (const ImageType &op2) const noexcept
 Checks whether two image types are not equal.
 

Detailed Description

Represents an image type, including pixel format and image dimensions.

Using a partially-specified image type is allowed when defining the buffer format of a sink. The sink will fill the other fields with data from the device automatically.

Constructor & Destructor Documentation

◆ ImageType() [1/2]

ImageType ( PixelFormat  pixel_format)
inlinenoexcept

Constructs an image type, specifying only a pixel format.

Width and height remain unspecified.

Parameters
[in]pixel_formatThe pixel format of the image

◆ ImageType() [2/2]

ImageType ( PixelFormat  pixel_format,
uint32_t  width,
uint32_t  height 
)
inlinenoexcept

Constructs an image type, specifying pixel format, width and height.

Parameters
[in]pixel_formatThe pixel format of the image
[in]widthThe width of the image in pixels
[in]heightThe height of the image in pixels

Member Function Documentation

◆ height()

uint32_t height ( ) const
inlinenoexcept

Returns the height of this image type.

Returns
The height of this image type, or 0 if the height is not specified.

◆ operator!=()

bool operator!= ( const ImageType op2) const
inlinenoexcept

Checks whether two image types are not equal.

Parameters
op2Other image type
Returns
true if this image type is different from op2, otherwise false.

◆ operator==()

bool operator== ( const ImageType op2) const
inlinenoexcept

Checks whether two image types are equal.

Parameters
op2Other image type
Returns
true if this image type is equal to op2, otherwise false.

◆ pixel_format()

PixelFormat pixel_format ( ) const
inlinenoexcept

Returns the pixel format of this image type.

Returns
The pixel format of this image type, or PixelFormat::Unspecified if the pixel format is not specified.

◆ width()

uint32_t width ( ) const
inlinenoexcept

Returns the width of this image type.

Returns
The width of this image type, or 0 if the height is not specified.