关于屏幕抓图的问题

jinruil 2004-04-08 09:45:31
麻烦各位兄弟,我想知道不用动态链接库屏幕抓图软件的原理是怎么样的?而且谁能提供一些关于屏幕抓图的相关详细的资料呢?
...全文
64 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
hebets 2010-05-31
  • 打赏
  • 举报
回复
看来没人帮忙呵呵
jinruil 2004-04-20
  • 打赏
  • 举报
回复
有人帮帮忙吗
jinruil 2004-04-17
  • 打赏
  • 举报
回复
这是我的导师做的抓图程序www.jmfbm.com/GetPic.exe

我根本上能看得懂里面的源代码!
但是现在要写论文,谁能帮忙看看此程序的原理,然后发点设计逻辑和设计流程之类的留言呢?谁也有相关屏幕抓图的论文呢?小弟刚到贵境,请各位多多指教!
jinruil 2004-04-16
  • 打赏
  • 举报
回复
各位兄弟,我通过连接
http://expert.csdn.net/Expert/topic/2944/2944435.xml?temp=1.650637E-02
这里面有这样一个连接
http://www.fantasiasoft.net/Documents/BMPFormat.htm是关于BMP的详细解释

谁可以提供一下关于"剪贴板""调色板"在VC上的详细解释,象上面的连接那种!
smallgenie 2004-04-12
  • 打赏
  • 举报
回复
得到当前dc,里面存放的就是当前窗口的显示图象,然后转移到别的dc里面保存就是抓到的屏幕了
ymbymb 2004-04-12
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2944/2944435.xml?temp=1.650637E-02
lanstar200 2004-04-12
  • 打赏
  • 举报
回复
不用其他動態庫和驅動的抓屏方法就是直接屏幕取圖了,創建屏幕DC保存為位圖就好了
ken1 2004-04-11
  • 打赏
  • 举报
回复
学习。
CounterHack 2004-04-11
  • 打赏
  • 举报
回复
原理:
1、创建屏幕DC;
2、将DC写入CBitmap;
3、将CBitmap写入文件。
smallgenie 2004-04-10
  • 打赏
  • 举报
回复


CDC dc;

dc.CreateDC("DISPLAY",NULL,NULL,NULL);

CBitmap bm;

int Width=GetSystemMetrics(SM_CXSCREEN);

int Height=GetSystemMetrics(SM_CYSCREEN);

bm.CreateCompatibleBitmap(&dc,Width,Height);

CDC tdc;

tdc.CreateCompatibleDC(&dc);

CBitmap*pOld=tdc.SelectObject(&bm);

tdc.BitBlt(0,0,Width,Height,&dc,0,0,SRCCOPY);

tdc.SelectObject(pOld);

BITMAP btm;

bm.GetBitmap(&btm);

DWORD size=btm.bmWidthBytes*btm.bmHeight;

LPSTR lpData=(LPSTR)GlobalAllocPtr(GPTR,size);

/////////////////////////////////////////////

BITMAPINFOHEADER bih;

bih.biBitCount=btm.bmBitsPixel;

bih.biClrImportant=0;

bih.biClrUsed=0;

bih.biCompression=0;

bih.biHeight=btm.bmHeight;

bih.biPlanes=1;

bih.biSize=sizeof(BITMAPINFOHEADER);

bih.biSizeImage=size;

bih.biWidth=btm.bmWidth;

bih.biXPelsPerMeter=0;

bih.biYPelsPerMeter=0;

GetDIBits(dc,bm,0,bih.biHeight,lpData,(BITMAPINFO*)&bih,DIB_RGB_COLORS);

//bm.GetBitmapBits(size,lpData);//此函数在处理5-5-5模式的16位色下会出现颜色混乱

static int filecount=0;

CString name;

name.Format("pict%04d.bmp",filecount++);

name=m_Path+name;

BITMAPFILEHEADER bfh;

bfh.bfReserved1=bfh.bfReserved2=0;

bfh.bfType=((WORD)(''M''<< 8)|''B'');

bfh.bfSize=54+size;

bfh.bfOffBits=54;

CFile bf;

if(bf.Open(name,CFile::modeCreate|CFile::modeWrite)){

bf.WriteHuge(&bfh,sizeof(BITMAPFILEHEADER));

bf.WriteHuge(&bih,sizeof(BITMAPINFOHEADER));

bf.WriteHuge(lpData,size);

bf.Close();

nCount++;

}

GlobalFreePtr(lpData);

if(nCount==1)

m_Number.Format("%d picture captured.",nCount);

else

m_Number.Format("%d pictures captured.",nCount);

UpdateData(FALSE);

jinruil 2004-04-10
  • 打赏
  • 举报
回复
谢谢,我要的并不是源代码!我想要的是原理!
酒红绿叶 2004-04-09
  • 打赏
  • 举报
回复
http://www.vckbase.com/code/listcode.asp?mclsid=7&sclsid=701&page=4
酒红绿叶 2004-04-09
  • 打赏
  • 举报
回复
http://www.vckbase.com/code/listcode.asp?mclsid=7&sclsid=705

19,466

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧