\n";
htmlFile.write(htmlRowStart, strlen(htmlRowStart));
unsigned int rowOffset = (bHeader.biHeight - row - 1) * actualRowBytes;
for (int col = 0; col < bHeader.biWidth; ++col) {
char htmlCellStart[] = "= 0; --z) {
int color = 0;//must be int for _itoa_s()
((char*)&color)[0] = pixelData[rowOffset + colOffset + z];
char hexcode[3];
memset(hexcode, 0, sizeof(hexcode));
_itoa_s(color, hexcode, sizeof(hexcode), 16);
//if hexcode is 1 char long, need to write a 0 too
if (hexcode[1] == 0) {
hexcode[1] = hexcode[0];
hexcode[0] = '0';
}
htmlFile.write(hexcode, 2);
}
char htmlCellEnd[] = "\"> | \n";
htmlFile.write(htmlCellEnd, strlen(htmlCellEnd));
}
char htmlRowEnd[] = "
\n";
htmlFile.write(htmlRowEnd, strlen(htmlRowEnd));
}
delete[] pixelData;
char htmlTableEnd[] = "