Describes the format and layout of a single image. More...
#include <imagedesc.h>
Public Types | |
| using | Ptr = SharedPtr< ImageDesc > |
| Shared pointer type for ImageDesc. | |
Public Member Functions | |
| ImageDesc () | |
| Constructs an invalid (default) image description with no pixel format. | |
| ImageDesc (const Size2Du32 &sz, int pixfmt) | |
| Constructs an image description from a size and pixel format ID. | |
| ImageDesc (size_t w, size_t h, int pixfmt) | |
| Constructs an image description from width, height, and pixel format ID. | |
| int | pixelFormatID () const |
| Returns the pixel format identifier. | |
| bool | isValid () const |
| Returns true if this image description has valid dimensions and pixel format. | |
| const Size2Du32 & | size () const |
| Returns the image dimensions. | |
| size_t | width () const |
| Returns the image width in pixels. | |
| size_t | height () const |
| Returns the image height in pixels. | |
| void | setSize (const Size2Du32 &val) |
| Sets the image dimensions. | |
| void | setSize (int width, int height) |
| Sets the image dimensions from width and height values. | |
| size_t | linePad () const |
| Returns the number of padding bytes appended to each scanline. | |
| void | setLinePad (size_t val) |
| Sets the number of padding bytes appended to each scanline. | |
| size_t | lineAlign () const |
| Returns the scanline alignment requirement in bytes. | |
| void | setLineAlign (size_t val) |
| Sets the scanline alignment requirement. | |
| bool | interlaced () const |
| Returns true if the image is interlaced. | |
| void | setInterlaced (bool val) |
| Sets whether the image is interlaced. | |
| const PixelFormat * | pixelFormat () const |
| Returns a pointer to the PixelFormat descriptor for this image. | |
| void | setPixelFormat (int pixfmt) |
| Sets the pixel format by ID. | |
| const Metadata & | metadata () const |
| Returns a const reference to the metadata. | |
| Metadata & | metadata () |
| Returns a mutable reference to the metadata. | |
| int | planeCount () const |
| Returns the number of image planes defined by the pixel format. | |
| String | toString () const |
| Returns a human-readable string representation of this image description. | |
| operator String () const | |
| Implicit conversion to String via toString(). | |
Describes the format and layout of a single image.
ImageDesc encapsulates image dimensions (Size2Du32), pixel format, line padding and alignment, interlace mode, and associated metadata. It is used by Image
Constructs an image description from a size and pixel format ID.
| sz | The image dimensions. |
| pixfmt | The pixel format identifier (PixelFormat enum value). |
Constructs an image description from width, height, and pixel format ID.
| w | The image width in pixels. |
| h | The image height in pixels. |
| pixfmt | The pixel format identifier (PixelFormat enum value). |
|
inline |
Returns the image height in pixels.
|
inline |
Returns true if the image is interlaced.
|
inline |
Returns true if this image description has valid dimensions and pixel format.
|
inline |
Returns the scanline alignment requirement in bytes.
|
inline |
Returns the number of padding bytes appended to each scanline.
|
inline |
Returns a pointer to the PixelFormat descriptor for this image.
|
inline |
Returns the pixel format identifier.
|
inline |
Returns the number of image planes defined by the pixel format.
Sets whether the image is interlaced.
| val | true for interlaced, false for progressive. |
Sets the scanline alignment requirement.
| val | The alignment in bytes. |
Sets the number of padding bytes appended to each scanline.
| val | The line padding in bytes. |
|
inline |
Sets the pixel format by ID.
| pixfmt | The pixel format identifier (PixelFormat enum value). |
Sets the image dimensions.
| val | The new Size2Du32 dimensions. |
|
inline |
Sets the image dimensions from width and height values.
| width | The new width in pixels. |
| height | The new height in pixels. |
Returns the image dimensions.
|
inline |
Returns a human-readable string representation of this image description.
|
inline |
Returns the image width in pixels.