.. index:: pair: class; P1::ImageSdk::BitmapFormat .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format: class P1::ImageSdk::BitmapFormat ================================ .. toctree:: :hidden: enum_P1_ImageSdk_BitmapFormat_PredefinedBitmapFormat.rst Overview ~~~~~~~~ Pixel format of a :ref:`BitmapImage `. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class BitmapFormat { public: // enums enum :ref:`PredefinedBitmapFormat`; // construction :ref:`BitmapFormat`( :ref:`BitDepth` bitDepth, :ref:`PixelLayout` pixelLayout, std::vector<:ref:`PixelComponent`> pixelComponents, bool alignment = true ); :ref:`BitmapFormat`(:ref:`PredefinedBitmapFormat` code); // methods :target:`operator int` (); :ref:`PixelLayout` :ref:`GetPixelLayout`() const; :ref:`BitDepth` :ref:`GetBitDepth`() const; int :ref:`GetBitsPerComponent`(); int :ref:`GetNumComponent`(); std::vector<:ref:`PixelComponent`> :ref:`GetPixelComponent`(); :target:`operator PredefinedBitmapFormat` () const; bool :ref:`operator ==` (const BitmapFormat& other); void :target:`operator =` (const BitmapFormat& other); bool :ref:`operator ==` (const :ref:`PredefinedBitmapFormat`& code); }; .. _details-class_p1_1_1_image_sdk_1_1_bitmap_format: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Pixel format of a :ref:`BitmapImage `. Construction ------------ .. index:: pair: function; BitmapFormat .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1a8ca0ba75825d5b72d3e80bd1842a8069: .. ref-code-block:: cpp :class: doxyrest-title-code-block BitmapFormat( :ref:`BitDepth` bitDepth, :ref:`PixelLayout` pixelLayout, std::vector<:ref:`PixelComponent`> pixelComponents, bool alignment = true ) Initialize Bitmap format. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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. .. index:: pair: function; BitmapFormat .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1a550343243f60ca8c608db7fe6177a790: .. ref-code-block:: cpp :class: doxyrest-title-code-block BitmapFormat(:ref:`PredefinedBitmapFormat` code) Initialized from predefined bitmap format. Methods ------- .. index:: pair: function; GetPixelLayout .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1ae808d3627dc65a9d7da98499acba52d2: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`PixelLayout` GetPixelLayout() const Return memory layout. .. index:: pair: function; GetBitDepth .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1a8b91174e672b5ea667eb9fcb9916c353: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`BitDepth` GetBitDepth() const Return bit depth of each pixel channel. .. index:: pair: function; GetBitsPerComponent .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1afe0e6edaef557d39fee4831b61ed5560: .. ref-code-block:: cpp :class: doxyrest-title-code-block int GetBitsPerComponent() Return number of bits per channel. .. index:: pair: function; GetNumComponent .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1aec9c37d4a20469c3970c114247a2070c: .. ref-code-block:: cpp :class: doxyrest-title-code-block int GetNumComponent() Return number of channels. .. index:: pair: function; GetPixelComponent .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1a8c0ad3cad622eb2ff68790c2b95d66fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block std::vector<:ref:`PixelComponent`> GetPixelComponent() Return component type of each channel. .. index:: pair: function; operator== .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1a589b6d17d20f22ed186d216f47074a5a: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool operator == (const BitmapFormat& other) Check if bitmap formats are identical .. index:: pair: function; operator== .. _doxid-class_p1_1_1_image_sdk_1_1_bitmap_format_1ace22ebb8a15e485f00282906dd38b869: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool operator == (const :ref:`PredefinedBitmapFormat`& code) Check if the bitmap format is identical to a predefined format.