putting blue mask over image (GDI+)

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

I have an image but I want to put a transparent blue layer over it, how
would I do this? I want to make an effect similar to the one you get when
you select an icon and it turns blue. thanks!
 
Smokey said:
I have an image but I want to put a transparent blue layer over it, how
would I do this? I want to make an effect similar to the one you get when
you select an icon and it turns blue. thanks!

How about this?

Image img = (Image)pictureBox1.Image.Clone();

using (Graphics g = Graphics.FromImage(img))
using (Brush brush = new SolidBrush(Color.FromArgb(70, Color.Blue))) {
g.FillRectangle(brush, 0, 0, img.Width, img.Height);
}

pictureBox1.Image = img;

hth,
Max
 
the problem with that is it even masks the transparent part of the image you
are blue masking... I want to preserve base image transparency
 
Back
Top