64 return _pixelFormat->id();
72 return _size.
isValid() && _pixelFormat->isValid();
201 return _pixelFormat->planeCount();
211 ret += _pixelFormat->name();
223 size_t _lineAlign = 1;
224 bool _interlaced =
false;
Describes the format and layout of a single image.
Definition imagedesc.h:33
ImageDesc()
Constructs an invalid (default) image description with no pixel format.
Definition imagedesc.h:40
String toString() const
Returns a human-readable string representation of this image description.
Definition imagedesc.h:208
Metadata & metadata()
Returns a mutable reference to the metadata.
Definition imagedesc.h:192
void setSize(const Size2Du32 &val)
Sets the image dimensions.
Definition imagedesc.h:103
void setLineAlign(size_t val)
Sets the scanline alignment requirement.
Definition imagedesc.h:147
void setInterlaced(bool val)
Sets whether the image is interlaced.
Definition imagedesc.h:164
size_t height() const
Returns the image height in pixels.
Definition imagedesc.h:95
size_t lineAlign() const
Returns the scanline alignment requirement in bytes.
Definition imagedesc.h:139
ImageDesc(size_t w, size_t h, int pixfmt)
Constructs an image description from width, height, and pixel format ID.
Definition imagedesc.h:56
bool isValid() const
Returns true if this image description has valid dimensions and pixel format.
Definition imagedesc.h:71
const Metadata & metadata() const
Returns a const reference to the metadata.
Definition imagedesc.h:187
bool interlaced() const
Returns true if the image is interlaced.
Definition imagedesc.h:156
int pixelFormatID() const
Returns the pixel format identifier.
Definition imagedesc.h:63
void setPixelFormat(int pixfmt)
Sets the pixel format by ID.
Definition imagedesc.h:181
const Size2Du32 & size() const
Returns the image dimensions.
Definition imagedesc.h:79
void setLinePad(size_t val)
Sets the number of padding bytes appended to each scanline.
Definition imagedesc.h:130
int planeCount() const
Returns the number of image planes defined by the pixel format.
Definition imagedesc.h:200
void setSize(int width, int height)
Sets the image dimensions from width and height values.
Definition imagedesc.h:113
size_t linePad() const
Returns the number of padding bytes appended to each scanline.
Definition imagedesc.h:122
ImageDesc(const Size2Du32 &sz, int pixfmt)
Constructs an image description from a size and pixel format ID.
Definition imagedesc.h:47
const PixelFormat * pixelFormat() const
Returns a pointer to the PixelFormat descriptor for this image.
Definition imagedesc.h:173
size_t width() const
Returns the image width in pixels.
Definition imagedesc.h:87
Dynamic array container wrapping std::vector.
Definition list.h:40
const T & height() const
Returns the height.
Definition size2d.h:72
void set(const T &w, const T &h)
Sets both width and height.
Definition size2d.h:48
const T & width() const
Returns the width.
Definition size2d.h:61
String toString() const
Returns the size as a string in "WxH" format.
Definition size2d.h:82
bool isValid() const
Returns true if both width and height are greater than zero.
Definition size2d.h:43
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19
#define PROMEKI_SHARED_FINAL(TYPE)
Macro for non-polymorphic native shared objects.
Definition sharedptr.h:88