Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Bitmaps with BitBlt

Status
Not open for further replies.

foxnet

Programmer
Mar 24, 2005
21
US
Hi,

I am trying to display bitmap images in my program, but for some reason certain images will not display. I have created the images through MSPaint. The only difference I did was by scanning the images in or drawing through paint. The files that were drawn through paint are getting saved with a Bit Depth of 32, while the scan pictures get a Bit Depth of 24. The pictures with a Bit Depth of 24 all will display, however the 32 bit depth will not show. I did modify a picture I drew in MSPaint and changed the bit depth to 24 and then the images displayed. Is there a parametet in the BitBlt function that I might be missing that will control the Bit Depth. I am currently using the "SRCCOPY" option.

Thanks
 
I remember reading that bitmaps (extension .bmp) don't officially support 32 bits. There are ways to make 32 bit bitmaps, but these would not be an "official" format. For example, MS Paint in windows XP SP 1 will not allow to save 32 bit bitmaps.

If there is now support for 32 bit bitmaps, it must be something very new, and depending on your Windows and VC++ versions, BitBlt might not be able to handle it.

To deal with 32 bit bitmaps (bitmaps with transparency), try AlphaBlend for example.

I hope this helps,

Vincent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top