Pblm with Alpha Blending in Bitmap in C#

  • Thread starter Thread starter Suresh S
  • Start date Start date
S

Suresh S

Dear All,

I want a bitmap's background alone to be alpha blended so
that the actual image area to be kept unchanged as it is.
The backgound color is uniform around the image.
It would be of great help and appreciation if iam helped
in this issue.
Thank you All for being involved in this issue.
 
I want a bitmap's background alone to be alpha blended so
that the actual image area to be kept unchanged as it is.
The backgound color is uniform around the image.
It would be of great help and appreciation if iam helped
in this issue.
Thank you All for being involved in this issue.

did you try to look at the MakeTransparent() method of a bitmap object?
I hope this helps you.

Regards, Wiktor
 
Are you loading the bitmap from a file, or are you creating it in code?

If you're loading it, then your best bet is to use a graphics program to set
whatever transparency you want, and then save the graphic as a .PNG file
(not a BMP). PNGs support full alpha transparency, so when your app loads
the PNG file, the background will be transparent just like you describe.
(You can even have antialiasing and partial transparency.)
 
Back
Top