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

How do I create a picture frame region?

0 views
Skip to first unread message

kevin haynie

unread,
Sep 15, 2002, 1:57:05 PM9/15/02
to
OK.. Here's one for you GDI+ gurus:

I am making a photo album program and need to be able to frame digital
pictures (bitmaps) with unique looking frame with unique shapes and
sizes (e.g. a circular border with babies hanging on either side of
the frame). The frames are not typically any particular shape (e.g.
not always circular or elliptical) so I can't just create a region
which clips my digital picture.

Basically, I need a way of creating a frame bitmap such that the inner
side of the frame is transparent to the digital picture being framed
(to allow the digital picture to show through), but the outer side of
the frame must be transparent to the background on which it sits (e.g.
a corkboard bitmap). I want to make a .Net control which descends
from pictureBox if possible.

Any ideas/expertise would be greatly appreciated!

Kevin

John Hornick [MS]

unread,
Sep 15, 2002, 6:17:43 PM9/15/02
to
Hi,


Off the top of my head: use a 32bppPARGB bitmap for your insert image,
and set the alpha values dependent on the frame bitmap, or use an
ImageAttributes to color key the DrawImage() so that only the inset
portion of the image shows up.

Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.

0 new messages