Edit

class Input::Frames::FrameFormat

Represents a collection of image format properties (e.g. FOURCC, width, height, stride, ...)

Members

Properties

Syntax: public FrameFormatProperties & Properties;

Gets a collection of additional FrameFormat properties.

~FrameFormat

Syntax: public inline virtual ~FrameFormat ( );

Destructs an instance of the FrameFormat class.

GetFourCC

Syntax: public inline std::string GetFourCC ( ) const;

Gets the image format's FOURCC value.

Returns

The FOURCC format code as a string

GetFourCC

Syntax: public inline void GetFourCC ( char * ch1 , char * ch2 , char * ch3 , char * ch4 ) const;

Gets the image format's FOURCC value.

Parameters

  • ch1 Pointer to char to receive FOURCC character 1

  • ch2 Pointer to char to receive FOURCC character 2

  • ch3 Pointer to char to receive FOURCC character 3

  • ch4 Pointer to char to receive FOURCC character 4

GetWidth

Syntax: public inline int GetWidth ( ) const;

Gets the image format's pixel width.

Returns

The image pixel width.

GetHeight

Syntax: public inline int GetHeight ( ) const;

Gets the image format's pixel height.

Returns

The image pixel height.

GetStride

Syntax: public inline int GetStride ( ) const;

Gets the image format's pixel stride.

Returns

The image pixel stride.

SetBitsPerPixel

Syntax: public inline void SetBitsPerPixel ( int bitsPerPixel );

Sets the image format's bits per pixel value.

Parameters

  • bitsPerPixel The image's bits per pixel value.

GetBitsPerPixel

Syntax: public inline int GetBitsPerPixel ( ) const;

Gets the image format's bits per pixel value.

Returns

The image's bits per pixel value.

CreateFourCCFormat

Syntax: public inline static std::shared_ptr< FrameFormat > CreateFourCCFormat ( char ch1 , char ch2 , char ch3 , char ch4 , int width , int height , int stride );

Initializes a new instance of the FrameFormat class based on a FourCC value.

Parameters

  • ch1 FOURCC character 1

  • ch2 FOURCC character 2

  • ch3 FOURCC character 3

  • ch4 FOURCC character 4

  • width The image format's pixel width

  • height The image format's pixel height

  • stride The image format's pixel stride

Returns

The newly created FrameFormat wrapped inside a std::shared_ptr

CreateRGBFormat

Syntax: public inline static std::shared_ptr< FrameFormat > CreateRGBFormat ( int bitsPerPixel , int width , int height , int stride );

Initializes a new instance of the FrameFormat class for uncompressed 32bit ARGB images.

Parameters

  • bitsPerPixel The image format's bits per pixel (e.g. 8, 16, 24, 32, ...)

  • width The image format's pixel width (e.g. 640)

  • height The image format's pixel height (e.g. 480)

  • stride The image format's pixel stride

Returns

The newly created FrameFormat wrapped inside a std::shared_ptr

CreateGreyFormat

Syntax: public inline static std::shared_ptr< FrameFormat > CreateGreyFormat ( int bitsPerPixel , int width , int height , int stride );

Initializes a new instance of the FrameFormat class for uncompressed Grey images.

Parameters

  • bitsPerPixel The image format's bits per pixel (e.g. 8, 16, 24, 32, ...)

  • width The image format's pixel width (e.g. 640)

  • height The image format's pixel height (e.g. 480)

  • stride The image format's pixel stride

Returns

The newly created FrameFormat wrapped inside a std::shared_ptr

CreateBGRFormat

Syntax: public inline static std::shared_ptr< FrameFormat > CreateBGRFormat ( int bitsPerPixel , int width , int height , int stride );

Initializes a new instance of the FrameFormat class for uncompressed BGR images.

Parameters

  • bitsPerPixel The image format's bits per pixel (e.g. 8, 16, 24, 32, ...)

  • width The image format's pixel width (e.g. 640)

  • height The image format's pixel height (e.g. 480)

  • stride The image format's pixel stride

Returns

The newly created FrameFormat wrapped inside a std::shared_ptr

CreateBGRAFormat

Syntax: public inline static std::shared_ptr< FrameFormat > CreateBGRAFormat ( int bitsPerPixel , int width , int height , int stride );

Initializes a new instance of the FrameFormat class for uncompressed BGRA images.

Parameters

  • bitsPerPixel The image format's bits per pixel (e.g. 8, 16, 24, 32, ...)

  • width The image format's pixel width (e.g. 640)

  • height The image format's pixel height (e.g. 480)

  • stride The image format's pixel stride

Returns

The newly created FrameFormat wrapped inside a std::shared_ptr