I need to set a picture in a background which is painted ownerdrawn using a LinearGradientBrush. In the picture the background should exactly show the gradient changeing colors of the other background, so my figure looks like directly being drawn into the GradientBackground When I create the picture ( icon ) with microangelo and having the backgroundcolors as being transparent, I dont get the background in the same way as the rest of the background is. In the moment I do something like
Code:
protected override void OnPaint(PaintEventArgs pe)
{
Graphics g = pe.Graphics;
.....
// Drawing the Background
LinearGradientBrush b = new LinearGradientBrush(rec, startColor, endColor, 90);
g.FillRectangle(b, rec);
...
// drawing the picture
Rectangle srcRect = new Rectangle(new Point(0, 0), _HeaderPicture.Size); 
g.DrawImage(_HeaderPicture, destRect, srcRect, g.PageUnit); 
...
But this looks as if it doesnt really have a transparent background but only one Color of my Gradient brush in the full background area

How to do this correct, or do i need to draw the full Icon myself too ?
Drawing each dot, which is not transparent myself too?
In this case my question is how to read out the color data of an icon pixel by pixel and how to paint each single pixel ?

Jonny Poet