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.Code: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. char temp2[7]="ff"; fread(&triple, sizeof(RGBTRIPLE), 1, inptr); temp= (BYTE)temp2; triple.rgbtGreen=temp; triple.rgbtRed=temp; triple.rgbtBlue=00; fwrite(&triple, sizeof(RGBTRIPLE), 1,outptr); }



LinkBack URL
About LinkBacks



