Graphics Question

Tech-Archive recommends: Fix windows errors by optimizing your registry



I am trying to simply embed a opaque image over another image...

if i use a windows form it works..

e.g.

Graphics g = this.pictureBox1.CreateGraphics();


g.Clear(this.BackColor);


Bitmap bitmap = new Bitmap(@"d:\\club_home_page_feature.jpg");

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.5f, 0},

new float[] {0, 0, 0, 0, 1}};

Rectangle rect = new Rectangle(0,0,bitmap.Width,bitmap.Height);

//Rectangle rect = new Rectangle20, 20, 200, 100);

ColorMatrix clrMatrix = new ColorMatrix(ptsArray);


ImageAttributes imgAttributes = new ImageAttributes();

imgAttributes.SetColorMatrix(clrMatrix,

ColorMatrixFlag.Default,

ColorAdjustType.Bitmap);

g.FillRectangle(Brushes.Black, rect);

g.DrawImage(bitmap,

new Rectangle(0, 0, bitmap.Width, bitmap.Height),

0, 0, bitmap.Width, bitmap.Height,

GraphicsUnit.Pixel, imgAttributes);

g.Dispose();



however how can i then save this newly createed image to the files sytem?


.