class P1::ImageSdk::BitmapFormat
Overview
Pixel format of a BitmapImage. More…
#include <P1ImageBitmapImage.hpp> class BitmapFormat { public: // enums enum PredefinedBitmapFormat; // construction BitmapFormat( BitDepth bitDepth, PixelLayout pixelLayout, std::vector<PixelComponent> pixelComponents, bool alignment = true ); BitmapFormat(PredefinedBitmapFormat code); // methods operator int (); PixelLayout GetPixelLayout() const; BitDepth GetBitDepth() const; int GetBitsPerComponent(); int GetNumComponent(); std::vector<PixelComponent> GetPixelComponent(); operator PredefinedBitmapFormat () const; bool operator == (const BitmapFormat& other); void operator = (const BitmapFormat& other); bool operator == (const PredefinedBitmapFormat& code); };
Detailed Documentation
Pixel format of a BitmapImage.
Construction
BitmapFormat( BitDepth bitDepth, PixelLayout pixelLayout, std::vector<PixelComponent> pixelComponents, bool alignment = true )
Initialize Bitmap format.
Parameters:
bitDepth |
Number of bits per channel. |
pixelLayout |
Memory layout of the bitmap. |
pixelComponents |
Channel types. Currently support maximum 5 channels. |
alignment |
Should align memory of each row to 8 bits in case of 12-bit bit depth. |
BitmapFormat(PredefinedBitmapFormat code)
Initialized from predefined bitmap format.
Methods
PixelLayout GetPixelLayout() const
Return memory layout.
BitDepth GetBitDepth() const
Return bit depth of each pixel channel.
int GetBitsPerComponent()
Return number of bits per channel.
int GetNumComponent()
Return number of channels.
std::vector<PixelComponent> GetPixelComponent()
Return component type of each channel.
bool operator == (const BitmapFormat& other)
Check if bitmap formats are identical
bool operator == (const PredefinedBitmapFormat& code)
Check if the bitmap format is identical to a predefined format.