1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
System.Drawing.Imaging.ImageAttributes ia = new System.Drawing.Imaging.ImageAttributes();
System.Drawing.Imaging.ColorMatrix cm = null;
cm = new System.Drawing.Imaging.ColorMatrix(new float[][]
{
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, 0}
});
ia.SetColorMatrix(cm);
Rectangle rect_image_fond = new Rectangle(0, 0, 100, 100);
g.DrawImage(Image_sc, rect_image_fond, 0, 0, 100, 100, System.Drawing.GraphicsUnit.Pixel, ia); |
Partager