Hi! I am using GDI+ (System.Drawing;)
How to?
a color t ex: Color.Magneta ( 255.0.255 ). Will be a color i use in my images backgrounds as transparency. And it has alpha if t ex: The images has shadows etc.
So i want to make the picture transparent with that color and if the color aplha is not 255 it will blend the image witch it is painted on darker.
To alpha blend using matrix.
CODE
Graphics g = this.CreateGraphics();
g.Clear(this.BackColor);
Bitmap bitmap = new Bitmap(Application.StartupPath + @"\image.bmp");
float[][] ptsArray ={
new float[] {1, 0, 0, 0, 0},
new float[] {0, 1, 0, 0, 0},
new float[] {0, 0, 1, 0, 0},
new float[] {0, 0, 0, 0.9f, 0},
new float[] {0, 0, 0, 0, 1}};
ColorMatrix clrMatrix = new ColorMatrix(ptsArray);
ImageAttributes imgAttributes = new ImageAttributes();
imgAttributes.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
g.DrawImage(bitmap, new Rectangle(0, 0, bitmap.Width, bitmap.Hedight), 0, 0, bitmap.Width, bitmap.Height, GraphicsUnit.Pixel, imgAttributes);
bitmap method.
CODE
bitmap.MakeTransparent(color)
Is it possible to implement them ?... Im i soppose to use getpixel, check alpha and blend each pixel

?
*EDIT* - Hope this is enought moderator PsychoCoder. I have really worked on this whole day.
This post has been edited by Mr.Penetration: 3 Jul, 2009 - 07:22 AM