WIN32,GetBitmapBits与GetPixel
来源:互联网 发布:好的健身软件 编辑:程序博客网 时间:2024/05/16 06:52
先看看MSDN上的,
The GetBitmapBits function copies the bitmap bits of a specified device-dependent bitmap into a buffer.
LONG GetBitmapBits(
_In_ HBITMAP hbmp,
_In_ LONG cbBuffer,
_Out_ LPVOID lpvBits
);
A handle to the device-dependent bitmap.
The number of bytes to copy from the bitmap into the buffer.
获取位图数据,并将数据拷贝到缓冲区中(第三个参数),位图数据是跟具体设备相关的。一般获取的位图数据为32位,如果将其保存为jpg的话,需要转换成24位的才行,某些开源看暂时不支持32的rgb空间位图。
GetPixel:
The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates.
COLORREF GetPixel(
_In_ HDC hdc,
_In_ int nXPos,
_In_ int nYPos
);
获取点(x,y)下的像素值。
两者均可以获取图像数据,但是GetBitmapBits要比GetPixel快至少10倍,所以当频繁读取具体像素值时,最好用GetBitmapBits。以前做过一个项目,创建一个位图,然后在上面绘制文本,然后把结果保存为图片,这时,采用GetBitmapBits拷贝数据。
- WIN32,GetBitmapBits与GetPixel
- GetBitmapBits与GetDIBits补零对齐的比较
- CDC::GetPixel
- GetBitmapBits捕获视频帧
- AS3 的BitmapData的setPixel与getPixel时,值不相同。
- 使用GetPixel要注意
- Windows绘图函数 - GetPixel
- C# GetPixel and SetPixel
- GetPixel SetPixel bitbil
- GetPixel 取像素点
- getpixel(0,0)
- WIN32 API与MFC
- WPF与Win32通信
- Java与Win32多线程
- _TrackMouseEvent 与 WIN32 ToolTip
- mfc与win32区别
- getPixel()和getRGB()的问题
- GetPixel取窗体颜色值
- 软件更新通知
- 跟我一起写 Makefile(三)
- const 的称谓:常量?
- Oracle Database 12.1中rman show all的新变化
- 第二篇
- WIN32,GetBitmapBits与GetPixel
- 利用混合高斯模型实现视频中运动目标与背景的分离
- C++ 子类构造函数的使用
- 网络传输过程
- 跟我一起写 Makefile(四)
- C++高级进阶
- CentOS下连VisualSVN服务器时报"Key usage violation"错误的解决方案
- Zookeeper与Kafka集群搭建
- Ubuntu Server下配置UTF-8中文/英文环境