Ich mochte eine zweite PictureBox transparent auf die Erste legen.Wenn ich als BackgroundColor transparent eingebe und das Bild transparent mache, ist es zwar heller aber nicht das untere Bild scheint nicht durch.
Bitmap original1 = new Bitmap(@"...png");
pictureBox1.Image = original1;
Bitmap original2 = new Bitmap(@"...png");
Bitmap temp = new Bitmap(original2.Width-10, original2.Height);
Graphics g = Graphics.FromImage(temp);
ColorMatrix cm = new ColorMatrix();
cm.Matrix33 = 0.5f;
ImageAttributes ia = new ImageAttributes();
ia.SetColorMatrix(cm, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
g.DrawImage(original, new Rectangle(0, 0, temp.Width, temp.Height), 0, 0, original.Width, original.Height, GraphicsUnit.Pixel, ia);
g.Dispose();
pictureBox2.Image = temp;
Hallo digi333,
du musst die PictureBoxen ineinander, nicht aufeinander legen. Siehe [Artikel] Zeichnen in Windows-Programmen. Da wird genau das gemacht.
herbivore