ImageFormat
Description
Stores information about dimensions and pixel format of an image.
Structure fields and default values (if defined) are described below:
- int Width - Image width in pixels
- int Height - Image height in pixels
- PlainType Type = UInt8 - Type of pixel components
- int Depth = 1 - Number of pixel components
- int PitchAlignment = 16
struct ImageFormat
{
int Width;
int Height;
PlainType Type;
int Depth;
int PitchAlignment;
explicit ImageFormat
(
PlainType Type_ = UInt8,
int Depth_ = 1,
int PitchAlignment_ = 16
) :
Type(Type_),
Depth(Depth_),
PitchAlignment(PitchAlignment_)
{}
int Width( void ) const { return Width; };
int Height( void ) const { return Height; };
PlainType Type( void ) const { return Type; };
int Depth( void ) const { return Depth; };
int PitchAlignment( void ) const { return PitchAlignment; };
bool operator == ( const avl::ImageFormat& rhs ) const
{
return Width == rhs.Width &&
Height == rhs.Height && Type == rhs.Type &&
Depth == rhs.Depth && PitchAlignment == rhs.PitchAlignment
;
}
bool operator != ( const avl::ImageFormat& rhs ) const
{
return !(operator==(rhs));
}
};
