MFC中怎么获取图像的像素矩阵
MFC中如何获取图像的像素矩阵
我刚做了一个很基础的在MFC平台上加载一张图像的程序,那么我该如何获取该图像的像素矩阵??
欢迎讨论,多谢各位大虾!!
------解决思路----------------------
BitBlt
GetPixel
------解决思路----------------------
GetDIBits function
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
Syntax
C++
int GetDIBits(
_In_ HDC hdc,
_In_ HBITMAP hbmp,
_In_ UINT uStartScan,
_In_ UINT cScanLines,
_Out_ LPVOID lpvBits,
_Inout_ LPBITMAPINFO lpbi,
_In_ UINT uUsage
);
我刚做了一个很基础的在MFC平台上加载一张图像的程序,那么我该如何获取该图像的像素矩阵??
欢迎讨论,多谢各位大虾!!
------解决思路----------------------
BitBlt
GetPixel
------解决思路----------------------
GetDIBits function
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
Syntax
C++
int GetDIBits(
_In_ HDC hdc,
_In_ HBITMAP hbmp,
_In_ UINT uStartScan,
_In_ UINT cScanLines,
_Out_ LPVOID lpvBits,
_Inout_ LPBITMAPINFO lpbi,
_In_ UINT uUsage
);