• 大小: 1.91MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-10
  • 语言: 其他
  • 标签: RGB  TO  BMP  

资源简介

当你想生成一个BMP图片却屡屡失败时,有没有很烦恼、很受挫,想要抓狂的赶脚,我想肯定有的.......怎么办了,用用我这个测试列子测试一下吧。这个测试程序,包含了生成RGB数据的方法和将RGB数据生成BMP图片的方法,你可以通过这个方法找到到底是你RGB数据的问题了,还是你生成BMP图片方法的问题

资源截图

代码片段和文件信息

#include
using namespace std;

typedef struct                       /**** BMP file header structure ****/
{
    unsigned int   bfSize;           /* Size of file */
    unsigned short bfReserved1;      /* Reserved */
    unsigned short bfReserved2;      /* ... */
    unsigned int   bfOffBits;        /* Offset to bitmap data */
} MyBITMAPFILEHEADER;

typedef struct                       /**** BMP file info structure ****/
{
    unsigned int   biSize;           /* Size of info header */
    int            biWidth;          /* Width of image */
    int            biHeight;         /* Height of image */
    unsigned short biPlanes;         /* Number of color planes */
    unsigned short biBitCount;       /* Number of bits per pixel */
    unsigned int   biCompression

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4085  2015-06-29 10:05  ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.vcxproj

     文件        942  2015-06-29 10:05  ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.vcxproj.filters

     文件        782  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\cl.command.1.tlog

     文件      11160  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\CL.read.1.tlog

     文件        576  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\CL.write.1.tlog

     文件       2114  2015-07-02 22:10  ConsoleApplication1\ConsoleApplication1\Debug\ConsoleApplication1.Build.CppClean.log

     文件         94  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\ConsoleApplication1.lastbuildstate

     文件       1638  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\ConsoleApplication1.log

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link-cvtres.read.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link-cvtres.write.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link-rc.read.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link-rc.write.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596-cvtres.read.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596-cvtres.write.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596-rc.read.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596-rc.write.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596.read.1.tlog

     文件          2  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.5596.write.1.tlog

     文件       1442  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.command.1.tlog

     文件       2460  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.read.1.tlog

     文件        750  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\link.write.1.tlog

     文件     139819  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\TEST.obj

     文件     257024  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\vc110.idb

     文件     339968  2015-07-03 14:50  ConsoleApplication1\ConsoleApplication1\Debug\vc110.pdb

     文件       3621  2015-07-03 14:52  ConsoleApplication1\ConsoleApplication1\TEST.cpp

     文件    8847360  2015-07-03 14:52  ConsoleApplication1\ConsoleApplication1.sdf

     文件        924  2015-06-29 10:03  ConsoleApplication1\ConsoleApplication1.sln

    ..A..H.     31744  2015-07-03 14:52  ConsoleApplication1\ConsoleApplication1.v11.suo

     文件      62976  2015-07-03 14:50  ConsoleApplication1\Debug\ConsoleApplication1.exe

     文件     397088  2015-07-03 14:50  ConsoleApplication1\Debug\ConsoleApplication1.ilk

............此处省略8个文件信息

评论

共有 条评论