Ok, so I have a program that essentially takes in a bmp file, and outputs a output bmp. Now, if I did nothing to the input file, then essentially the same file will write as the output file. I have the capability of altering the color of the out file to a single color.But for the life of me,I cant figure out how to add multiples color to the output file. So say for example, if I had a input file that contains the colors red and white. How would I alter it(the input file) to change the color format to say, blue and white. Here is the code I have:
Any help would be greatly apprecitaed. Thanks.
for (int j = 0; j < bi.biWidth; j++)
// temporary storage
RGBTRIPLE triple;// RGBTRIPLE is a struct
BYTE temp; //BYTE is a struct that is made up of uint8_t.
fread(&triple, sizeof(RGBTRIPLE), 1, inptr);
fwrite(&triple, sizeof(RGBTRIPLE), 1,outptr);