首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

请问图形算法:将TBitmap RGB中提取红绿色放到一个Buffer中

2012-04-06 
请教图形算法:将TBitmap RGB中提取红绿色放到一个Buffer中蓝色删除,每个点占用两个bitBOOLTransData(TBitm

请教图形算法:将TBitmap RGB中提取红绿色放到一个Buffer中
蓝色删除,   每个点占用两个bit

BOOL   TransData(TBitmap   *bmp,BYTE*   buf);

谢谢!

[解决办法]
http://community.csdn.net/Expert/topic/5273/5273767.xml?temp=.8370783
[解决办法]
TBitmap *bmp;
BITMAP bm;
GetObject(bmp-> Handle,sizeof(BITMAP),&bm);

bm-> bmBits就是颜色数据指针


BITMAP 结构定义
The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.

typedef struct tagBITMAP { // bm
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
LPVOID bmBits;
} BITMAP;

Members
bmType
Specifies the bitmap type. This member must be zero.
bmWidth
Specifies the width, in pixels, of the bitmap. The width must be greater than zero.
bmHeight
Specifies the height, in pixels, of the bitmap. The height must be greater than zero.
bmWidthBytes
Specifies the number of bytes in each scan line. This value must be divisible by 2, because the system assumes that the bit values of a bitmap form an array that is word aligned.
bmPlanes
Specifies the count of color planes.
bmBitsPixel
Specifies the number of bits required to indicate the color of a pixel.
bmBits
Pointer to the location of the bit values for the bitmap. The bmBits member must be a long pointer to an array of character (1-byte) values.

[解决办法]
mark

[解决办法]
look

热点排行