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]
|
inlinenoexcept |
Constructs an image type, specifying only a pixel format.
Width and height remain unspecified.
- Parameters
-
[in] pixel_format The pixel format of the image
◆ ImageType() [2/2]
|
inlinenoexcept |
Constructs an image type, specifying pixel format, width and height.
- Parameters
-
[in] pixel_format The pixel format of the image [in] width The width of the image in pixels [in] height The height of the image in pixels
Member Function Documentation
◆ height()
|
inlinenoexcept |
Returns the height of this image type.
- Returns
- The height of this image type, or
0
if the height is not specified.
◆ operator!=()
|
inlinenoexcept |
Checks whether two image types are not equal.
- Parameters
-
op2 Other image type
- Returns
true
if this image type is different from op2, otherwisefalse
.
◆ operator==()
|
inlinenoexcept |
Checks whether two image types are equal.
- Parameters
-
op2 Other image type
- Returns
true
if this image type is equal to op2, otherwisefalse
.
◆ pixel_format()
|
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()
|
inlinenoexcept |
Returns the width of this image type.
- Returns
- The width of this image type, or
0
if the height is not specified.