i'm gonna go procrastinate

main
ieee 802.11ac 1 year ago
parent f6e340dbae
commit 2fe71597c3

@ -97,8 +97,8 @@ int main(int argc, char** argv) {
bitmapHeader.bypl = filearray[9]; printf("bytes per line: %i\n", bitmapHeader.bypl);
if (bitmapHeader.bpp == 4) {
uint32_t palette[16];
uint32_t tmpCol;
tmpCol += filearray[16]; tmpCol = tmpCol << 8; tmpCol += filearray[17]; tmpCol = tmpCol << 8; tmpCol += filearray[18]; tmpCol = tmpCol << 8; tmpCol += filearray[19];
uint32_t tmpCol = ((uint32_t *) filearray)[4];
tmpCol = ((tmpCol & 0xFF) << 24) | ((tmpCol & 0xFF00) << 8) | ((tmpCol & 0xFF0000) >> 8) | ((tmpCol & 0xFF000000) >> 24);
printf("0x%08x\n", tmpCol);
printf("%u %u %u %u\n", filearray[16], filearray[17], filearray[18], filearray[19]);
}

Loading…
Cancel
Save