表示影像格式屬性的集合 (例如 FOURCC、width、height、stride、...)
成員
屬性
語法: public FrameFormatProperties & Properties;
取得其他 FrameFormat 屬性的集合。
~FrameFormat
語法: public inline virtual ~FrameFormat ( );
解構 FrameFormat 類別的實例。
GetFourCC
語法: public inline std::string GetFourCC ( ) const;
取得影像格式的 FOURCC 值。
傳回
FOURCC 格式程式碼做為字串
GetFourCC
語法: public inline void GetFourCC ( char * ch1 , char * ch2 , char * ch3 , char * ch4 ) const;
取得影像格式的 FOURCC 值。
參數
ch1要接收 FOURCC 字元 1 的字元指標ch2接收 FOURCC 字元 2 的字元指標ch3接收 FOURCC 字元 3 的字元指標ch4要接收 FOURCC 字元 4 的字元指標
GetWidth
語法: public inline int GetWidth ( ) const;
取得影像格式的圖元寬度。
傳回
影像圖元寬度。
GetHeight
語法: public inline int GetHeight ( ) const;
取得影像格式的圖元高度。
傳回
影像圖元高度。
GetStride
語法: public inline int GetStride ( ) const;
取得影像格式的圖元步進。
傳回
影像圖元的步進。
SetBitsPerPixel
語法: public inline void SetBitsPerPixel ( int bitsPerPixel );
設定每個圖元值的影像格式位。
參數
-
bitsPerPixel每個圖元值的影像位。
GetBitsPerPixel
語法: public inline int GetBitsPerPixel ( ) const;
取得每個圖元值的影像格式位。
傳回
每個圖元值的影像位。
CreateFourCCFormat
語法: public inline static std::shared_ptr< FrameFormat > CreateFourCCFormat ( char ch1 , char ch2 , char ch3 , char ch4 , int width , int height , int stride );
根據 FourCC 值,初始化 FrameFormat 類別的新實例。
參數
ch1FOURCC 字元 1ch2FOURCC 字元 2ch3FOURCC 字元 3ch4FOURCC 字元 4width影像格式的圖元寬度height影像格式的圖元高度stride影像格式的圖元步進
傳回
新建立的 FrameFormat 包裝在 std::shared_ptr
CreateRGBFormat
語法: public inline static std::shared_ptr< FrameFormat > CreateRGBFormat ( int bitsPerPixel , int width , int height , int stride );
針對未壓縮的 32 位 ARGB 影像,初始化 FrameFormat 類別的新實例。
參數
bitsPerPixel影像格式的每個圖元位 (例如 8、16、24、32、...)width影像格式的圖元寬度 (例如 640)height影像格式的圖元高度 (例如 480)stride影像格式的圖元步進
傳回
新建立的 FrameFormat 包裝在 std::shared_ptr
CreateGreyFormat
語法: public inline static std::shared_ptr< FrameFormat > CreateGreyFormat ( int bitsPerPixel , int width , int height , int stride );
針對未壓縮的灰色影像,初始化 FrameFormat 類別的新實例。
參數
bitsPerPixel影像格式的每個圖元位 (例如 8、16、24、32、...)width影像格式的圖元寬度 (例如 640)height影像格式的圖元高度 (例如 480)stride影像格式的圖元步進
傳回
新建立的 FrameFormat 包裝在 std::shared_ptr
CreateBGRFormat
語法: public inline static std::shared_ptr< FrameFormat > CreateBGRFormat ( int bitsPerPixel , int width , int height , int stride );
初始化未壓縮 BGR 影像之 FrameFormat 類別的新實例。
參數
bitsPerPixel影像格式的每個圖元位 (例如 8、16、24、32、...)width影像格式的圖元寬度 (例如 640)height影像格式的圖元高度 (例如 480)stride影像格式的圖元步進
傳回
新建立的 FrameFormat 包裝在 std::shared_ptr
CreateBGRAFormat
語法: public inline static std::shared_ptr< FrameFormat > CreateBGRAFormat ( int bitsPerPixel , int width , int height , int stride );
初始化未壓縮 BGRA 影像之 FrameFormat 類別的新實例。
參數
bitsPerPixel影像格式的每個圖元位 (例如 8、16、24、32、...)width影像格式的圖元寬度 (例如 640)height影像格式的圖元高度 (例如 480)stride影像格式的圖元步進
傳回
新建立的 FrameFormat 包裝在 std::shared_ptr