如题

解决方案 »

  1.   

    就是bmp的bits数据,图象数据。不包括图象头,
      

  2.   

    http://dev.csdn.net/develop/article/15/15549.shtm
      

  3.   

    dirdirdir3(风) 
    我用ISampleGrabber的GetConnectedMediaType中的相关结构是存在何处的
    我将 GetCurrentBuffer得到的buff写入文件,显示不出图片
    写入的是用WriteDIB("test.bmp",buffer,z);WriteDIB(LPTSTR szFile, HANDLE hDIB, long size)
    {
       BITMAPFILEHEADER hdr;
       LPBITMAPINFOHEADER lpbi;
       if (!hDIB)
           return false;   FILE* file=0;   file = fopen(szFile,"wb");
       if(!file)
           return false;   lpbi = (LPBITMAPINFOHEADER)hDIB;   int nColors = 1 << lpbi->biBitCount;   if (nColors > 256)
          nColors = 0;
       hdr.bfType = ((WORD) ('M' << 8) | 'B'); // is always "BM"
       hdr.bfSize =/* GlobalSize (hDIB) + */sizeof( hdr );
       hdr.bfSize = size + sizeof( hdr );
       hdr.bfReserved1 = 0;
       hdr.bfReserved2 = 0;
       hdr.bfOffBits = (DWORD) (sizeof( hdr ) + lpbi->biSize +
       nColors * sizeof(RGBQUAD)); // Write the file header   fwrite(&hdr, 1, sizeof(hdr),file); // Write the DIB header and the bits
       fwrite(lpbi, 1, size ,file);   fclose(file);
       return true;
    }
      

  4.   

    由于不太明确buff中的数据包括哪些信息。所以也不知道那个写入文件的程序对不对(程序是别人写的)希望高人指教