Groups | Blog | Home
all groups > dotnet drawing api > october 2003 >

dotnet drawing api : Fade IN/OUT of Images/Bitmaps



Nick
10/12/2003 3:02:50 AM
Hi,

i have a pictureBox with a BackgroundImage and a
Bitmap (Image) with some Transparent stuff and pixels
but no palette, because there're are more colors needed
although i could use less color, it doesn't seem to
work right to Initialize a Bitmap with PixelFormat
options.

So do you know who to implement a fade in/out effekt ?

Thanks,
Bob Powell [MVP]
10/13/2003 3:36:47 PM
Doint this with a PictureBox is nott a particularly good idea because PB
paints it's background before it displays the picture which would cause
flashing.

I suggest creating a control with two image properties and a timer. The
timer can be set to invalidate the control at a certain interval and the
images drawn so that the background is opaque and the foreground is
semi-transparent by using an ImageAttributes and a ColorMatrix set for
transparency adjustment.

See the GDI+ FAQ for articles on how to draw semi-transparent images.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Blog http://bobpowelldotnet.blogspot.com

[quoted text, click to view]

AddThis Social Bookmark Button