Skip to content

Instantly share code, notes, and snippets.

@aneury1
Created October 17, 2017 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aneury1/25131e146a8ebcfa580b449feca2f1a1 to your computer and use it in GitHub Desktop.
Save aneury1/25131e146a8ebcfa580b449feca2f1a1 to your computer and use it in GitHub Desktop.
#include <fstream>
using namespace std;
static const unsigned char bmp[]=
{
0x42,0x4D,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x36,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x02,0x00,
0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x18,0x00,
0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x13,0x0B,
0x00,0x00,0x13,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,
00, 00, 00, 00, 00, 00,0xFF,0xFF,0xFF,0xFF,
00, 00,0xFF, 00, 00, 00,0xFF, 00, 00, 00
};
int main(int argc, char *argv[])
{
int len = sizeof(bmp[0])/sizeof(bmp);
fstream test("ztest.bmp", ios::out);
test.write((char *)bmp, 70);
test.flush();
test.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment