Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I render the control to a memory DC, why is the bitmaps RGB values pre-multiplied?

0
Posted

When I render the control to a memory DC, why is the bitmaps RGB values pre-multiplied?

0

The control’s PaintPicture method and the Picture.Render method use GDI+ rendering APIs to paint the image. Those APIs will premultiply the information in the bitmap when the bitmap is at a depth of 32 bit and exists in a memory DC. Though a majority of applications cannot or do not recognize premultiplied values, the control can and does. Recommend using AlphaBlend vs BitBlt when painting from a 32 bit DIB.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123