Mögliche Duplizieren:
Image splitting into 9 piecesSchneiden Sie ein Bild in 9 Stücke C#
Obwohl ich genug gegoogelt aber leider versäumt eine Hilfe zu finden. Diese Code Project Tutorial versagte mir auch, was ich eigentlich brauche.
Ich habe ein Bild und 9 PictureBox (s) in einem WinForm.
Image img = Image.FromFile("media\\a.png"); // a.png has 312X312 width and height
// some code help, to get
// img1, img2, img3, img4, img5, img6, img7, img8, img9
// having equal width and height
// then...
pictureBox1.Image = img1;
pictureBox2.Image = img2;
pictureBox3.Image = img3;
pictureBox4.Image = img4;
pictureBox5.Image = img5;
pictureBox6.Image = img6;
pictureBox7.Image = img7;
pictureBox8.Image = img8;
pictureBox9.Image = img9;
Hier ist ein Beispiel Bild für Sie:
Dies ist ein Teil meines Picture Puzzle Klasse-Projekt ist. Ich habe mit Photoshop Bilder gemacht, jetzt möchte ich dynamisch schneiden.
Vielen Dank im Voraus.