Hi there,
For some strange reason I could not get the Framework to save a GIF with
transparency,but unforatunely the GIF encoder does not have any setable
parameters so I couldn't do much more. (FW 1.0)
I could on the other hand save the picture as a PNG with transparency.
Making a bitmap object is a piece of cake,
Dim pop As New Bitmap(1, 1, Imaging.PixelFormat.Format32bppArgb)
Call pop.Save("c:\pop.png", Imaging.ImageFormat.Png)
The above will make a 1 x 1 bitmap with an alpha channel, the default
colour appears to be alpha already so there is no need to set it, but if you
want to make a pixel completely transparent do the following
Call pop.SetPixel(0, 0, Color.FromArgb(0, 0, 0, 0))
The first value (Alpha) ranges from 0 (Transparent) to 1 (Opaque). I
hope that this helps!
Nick.
"Todd H" <Todd
H@discussions.microsoft.com> wrote in message
news:6B**********************************@microsof t.com...
How would I create a 1x1 pixel transparent gif in memory? I don't want to
load it from an existing file.
Thanks,
Todd