ExclamationHelpNeed help

Posts 1–5 of 5 · Page 1 of 1
Need help
Guys any hints , how to make bmp color changer program in win32 console . For example run console and it will change bmp file's pixels
  • Load the bitmap of your choice into memory one way or another.
  • Use GetObject on the memory to convert to a BITMAP object.
  • Use CreateCompatibleDC with GetDIBits to obtain the BITMAPINFO data of the bitmap.


Once you have done that you'll have access to the bitmaps pixel data from GetDIBits. The BITMAPINFO struct should be filled out properly with the bitmap information before calling GetDIBits with it or you will land up crashing due to access violations and such.

Be sure to cleanup the handles/objects you create as well.
what about linux ?
No idea I don't code for portability. Plus you said 'win32' in your main post so figured you wanted Windows specific stuff.
thx anyway for information
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us