[Solved] How to change RGB values in c++ [closed]


I feel like this question’s potential was ignored because of the irrelevant snippet of code and the misleading opening and reading text file part.

You can replace change and replace RGB values in bitmaps with HBITMAP in windows.h(MFC)

The Solution:

HBITMAP hBmp;
CCloneBitmap bmpClone;
HICON hIcon;
hBmp=LoadBitmap(AfxGetResourceHandle(),MAKEINTRESOURCE(ID_LIGHTCAR));
if(hBmp!=NULL)
{
  bmpClone.Clone(hBmp);
  DeleteObject(hBmp);
  bmpClone.ChangeColor(IRGB(0,0,0), IRGB(255,0,0));
  // change BLACK pixels to RED ones. 
  //Change the IRGB values to whatever you would like - blue - IRGB(0,0,255) 
}

1

solved How to change RGB values in c++ [closed]