Graphics Question
- From: "Darren Clark" <darren@xxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 20:59:26 +1000
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?
.
- Follow-Ups:
- Re: Graphics Question
- From: Ski
- Re: Graphics Question
- From: Oliver Sturm
- Re: Graphics Question
- Prev by Date: Howto capture VIDEO, not only acquire a single image from a usb we
- Next by Date: Re: how do I input costum content into the Winforms.WebBrowser?
- Previous by thread: Howto capture VIDEO, not only acquire a single image from a usb we
- Next by thread: Re: Graphics Question
- Index(es):