J
James
Hello,
I use to use borland c++ where I would create an image (with a black
background), and a mask (with a white background, where the image is
black). I would then And the mask and or the image. This created a
transparent copy.
I cannot find anyway to do this using c# - can anyone please help?
Current code to get the image up there:
Bitmap drawpad = new Bitmap(300, 300);
Graphics screen = CreateGraphics();
Graphics drawpadg = Graphics.FromImage(drawpad);
Bitmap lemframes =
(Bitmap)Bitmap.FromStream(this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.lemwalk.gif"));
drawpadg.Clear(this.BackColor);
drawpadg.DrawImage(lemframes, new Rectangle(x+lo[f], y,
lw[f], 46), lx[f], 0, lw[f], 46, GraphicsUnit.Pixel);
screen.DrawImage(drawpad, 0, 0);
screen.Dispose();
drawpadg.Dispose();
lemframes.Dispose();
Many thanks for reading this, James.
I use to use borland c++ where I would create an image (with a black
background), and a mask (with a white background, where the image is
black). I would then And the mask and or the image. This created a
transparent copy.
I cannot find anyway to do this using c# - can anyone please help?
Current code to get the image up there:
Bitmap drawpad = new Bitmap(300, 300);
Graphics screen = CreateGraphics();
Graphics drawpadg = Graphics.FromImage(drawpad);
Bitmap lemframes =
(Bitmap)Bitmap.FromStream(this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.lemwalk.gif"));
drawpadg.Clear(this.BackColor);
drawpadg.DrawImage(lemframes, new Rectangle(x+lo[f], y,
lw[f], 46), lx[f], 0, lw[f], 46, GraphicsUnit.Pixel);
screen.DrawImage(drawpad, 0, 0);
screen.Dispose();
drawpadg.Dispose();
lemframes.Dispose();
Many thanks for reading this, James.