Changeset cc8f3af in thomson
- Timestamp:
- Mar 19, 2012, 7:46:08 AM (12 years ago)
- Branches:
- main
- Children:
- 7cabd49
- Parents:
- e18627d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gfx2mo5/png2mo5.c
re18627d rcc8f3af 42 42 43 43 // End marker block : type=255, size and address=0 44 const unsigned char end[]={255,0,0,0 x30,0};44 const unsigned char end[]={255,0,0,0,0}; 45 45 46 46 if(argc != 3) … … 129 129 outBuffer = raw2mo5(inBuffer); 130 130 131 int pxsize = width * height / 8; 132 thomheader[7] = pxsize >> 8; 133 thomheader[8] = pxsize; 134 131 135 outFile = fopen(argv[2], "wb"); 132 136 fwrite(thomheader, 1, sizeof(thomheader), outFile); 133 137 //write forme data 134 fwrite(outBuffer, 1, 0x1F40, outFile);138 fwrite(outBuffer, 1, pxsize, outFile); 135 139 thomheader[5] = 0x50; 136 140 fwrite(thomheader, 1, sizeof(thomheader), outFile); 137 141 // write color data 138 fwrite(outBuffer+0x2000, 1, 0x1f40, outFile);142 fwrite(outBuffer+0x2000, 1, pxsize, outFile); 139 143 fwrite(end, 1, sizeof(end), outFile); 140 144
Note:
See TracChangeset
for help on using the changeset viewer.