1、CImage為ATL之元件包裝成MFC的形式來使用,支援的形式包括bmp、jpg、png和gif。
2、必須include “atlimage.h”才可使用
3、CImage::bool Draw(pDC->m_hDC,ShowRect):顯現圖形在DC上。
4、CImage::int GetHeight( ):擷取目前影像的高度 (以像素為單位)。
5、CImage::COLORREF GetPixel(int x,int y ):在(x,y) 位置的像素色彩。
6、CImage::int GetWidth( ):擷取目前影像的寬度 (以像素為單位)。
7、CImage::bool IsNull( ):判斷影像是否已載入。
8、CImage::Load(LPCTSTR pszFileName ):載入圖片。
9、CImage::Save(LPCTSTR pszFileName ):儲存圖片。
10、CImage::void SetPixel(int x,int y,COLORREF color):在指定位置設定像素的色彩。
11、CImage::bool Create(int nWidth,int nHeight,int nBPP) 初始新創圖片
12、GetRValue(COLORREF color)
GetGValue(COLORREF color)
GetBValue(COLORREF color):分別得到此色彩的R.G.B值。
文章標籤
全站熱搜
