Created
October 17, 2017 04:05
-
-
Save aneury1/25131e146a8ebcfa580b449feca2f1a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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