Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TransparentBLT in GDI+

112 views
Skip to first unread message

John Lutz

unread,
Jun 19, 2008, 11:27:01 AM6/19/08
to
App: C++/MFC
Problem: I'm starting with a HBITMAP. I would like to use GDI+ to do a
nice looking stretch and also need to draw the bitmap with a "transparent"
color so stuff underneath shows through.

DrawImage handles the stretching although it's extremely slow compared to
StretchBlt.

1) How can I speed DrawImage up?
2) How can I specify a transparent color?

Thanks,

John

Michael Phillips, Jr.

unread,
Jun 20, 2008, 8:45:11 AM6/20/08
to
> Problem: I'm starting with a HBITMAP. I would like to use GDI+ to do a
> nice looking stretch and also need to draw the bitmap with a "transparent"
> color so stuff underneath shows through.

> 2) How can I specify a transparent color?

Use ImageAttributes::SetColorKey. See MSDN:
http://msdn.microsoft.com/en-us/library/ms535429(VS.85).aspx


0 new messages