I would try creating a second image with 50% transparency. As a System.Drawing.Bitmap you can get and set its Pixels (GetPixel, SetPixel):
Color pixelColor = bitmap.GetPixel(x,y);
Color transparentPixelColor = MakePixelTransparent(pixelColor);
bitmap.SetPixel(x,y,transparentPixelColor);
MakePixelTransparent()
would set the alpha value in the supplied color (something like getting the ARGB-value, setting the A-byte and create a new color out of the new Argb-value).
Thats what I would try (I didn't though)...
EDIT:
I tried it now, out of curiosity:
Bitmap bitmap = new Bitmap( "YourImageFile.jpg" );
bitmap.MakeTransparent();
for ( int y = 0; y < bitmap.Height; y++ ) {
for ( int x = 0; x < bitmap.Width; x++ ) {
Color pixelColor = bitmap.GetPixel( x, y );
Color transparentPixelColor = Color.FromArgb( pixelColor.ToArgb() & 0x7fffffff );
bitmap.SetPixel( x, y, transparentPixelColor );
}
}
e.Graphics.DrawImage( bitmap, 10, 10 );
Works. That way you can also make only parts of the image transparent...