位图读取 需要带调色版的位图信息读取方法,希望能得到点资料.谢谢高手们.[email protected] 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for(int i=0;i<tmpHeight;i++) { yd=BFH.bfOffBits+i*PerLine; BYTE *pbyte= new BYTE[600*PerLine+600]; memset(pbyte,0x00,600*PerLine+600); int stmp=0; for(int j=0;j<wNewWidth;j++) { xd=yd+j; fseek(fp,xd,SEEK_SET); fread(&counts,sizeof(BYTE),1,fp); BYTE bcounts=counts; BYTE mcounts=counts>>4; int scounts=mcounts & 0x0F; int art; art=bcounts & 0x0F; RGBQUAD color; color=ColorTab[scounts]; pbyte[stmp++]=color.rgbBlue; pbyte[stmp++]=color.rgbGreen; pbyte[stmp++]=color.rgbRed; tmp=tmp+3; RGBQUAD color1; color1=ColorTab[art]; pbyte[stmp++]=color1.rgbBlue; pbyte[stmp++]=color1.rgbGreen; pbyte[stmp++]=color1.rgbRed; tmp=tmp+3; } file.Write(pbyte,stmp);//位图内容 delete []pbyte;这个4位转为24位图象的时候有些图象正常有些就不正常,哪位知道原因啊 for(int i=0;i<tmpHeight;i++){ yd=BFH.bfOffBits+i*PerLine; BYTE *pbyte= new BYTE[600*PerLine+600]; memset(pbyte,0x00,600*PerLine+600); int stmp=0; for(int j=0;j<wNewWidth;j++) { xd=yd+j; fseek(fp,xd,SEEK_SET); fread(&counts,sizeof(BYTE),1,fp); BYTE bcounts=counts; BYTE mcounts=counts>>4; int scounts=mcounts & 0x0F; int art; art=bcounts & 0x0F; RGBQUAD color; color=ColorTab[scounts]; pbyte[stmp++]=color.rgbBlue; pbyte[stmp++]=color.rgbGreen; pbyte[stmp++]=color.rgbRed; RGBQUAD color1; color1=ColorTab[art]; pbyte[stmp++]=color1.rgbBlue; pbyte[stmp++]=color1.rgbGreen; pbyte[stmp++]=color1.rgbRed; } file.Write(pbyte,stmp);//位图内容 delete []pbyte;} 子对话框调用父对话框的写串口函数提示句柄无效 窗口焦点 请教 还是刚才问题 用ADO 操作SQL SERVER数据库时,为什么执行delete Table1时有时成功有时执行失败。Table1中只有2万多条记录。 请问这个"6"派什么用处? 请问!!!!! ADO的问题 如何 创建含Active 控件动态链接库 呵呵,请教VC高手 PreTranslateMessage是用来相应什么消息的? 高分求windows下音频采集相关资源和代码!!!
{
yd=BFH.bfOffBits+i*PerLine;
BYTE *pbyte= new BYTE[600*PerLine+600];
memset(pbyte,0x00,600*PerLine+600);
int stmp=0;
for(int j=0;j<wNewWidth;j++)
{
xd=yd+j;
fseek(fp,xd,SEEK_SET);
fread(&counts,sizeof(BYTE),1,fp);
BYTE bcounts=counts;
BYTE mcounts=counts>>4;
int scounts=mcounts & 0x0F;
int art;
art=bcounts & 0x0F; RGBQUAD color;
color=ColorTab[scounts];
pbyte[stmp++]=color.rgbBlue;
pbyte[stmp++]=color.rgbGreen;
pbyte[stmp++]=color.rgbRed;
tmp=tmp+3;
RGBQUAD color1;
color1=ColorTab[art];
pbyte[stmp++]=color1.rgbBlue;
pbyte[stmp++]=color1.rgbGreen;
pbyte[stmp++]=color1.rgbRed;
tmp=tmp+3;
}
file.Write(pbyte,stmp);//位图内容
delete []pbyte;
这个4位转为24位图象的时候有些图象正常有些就不正常,
哪位知道原因啊
{
yd=BFH.bfOffBits+i*PerLine;
BYTE *pbyte= new BYTE[600*PerLine+600];
memset(pbyte,0x00,600*PerLine+600);
int stmp=0;
for(int j=0;j<wNewWidth;j++)
{
xd=yd+j;
fseek(fp,xd,SEEK_SET);
fread(&counts,sizeof(BYTE),1,fp);
BYTE bcounts=counts;
BYTE mcounts=counts>>4;
int scounts=mcounts & 0x0F;
int art;
art=bcounts & 0x0F; RGBQUAD color;
color=ColorTab[scounts];
pbyte[stmp++]=color.rgbBlue;
pbyte[stmp++]=color.rgbGreen;
pbyte[stmp++]=color.rgbRed;
RGBQUAD color1;
color1=ColorTab[art];
pbyte[stmp++]=color1.rgbBlue;
pbyte[stmp++]=color1.rgbGreen;
pbyte[stmp++]=color1.rgbRed;
}
file.Write(pbyte,stmp);//位图内容
delete []pbyte;
}