Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (face == null)
- {
- throw new ArgumentNullException("Brak Bazy!");
- }
- if (hair == null)
- {
- throw new ArgumentNullException("Oczy nie zostały wybrane!");
- }
- Bitmap outputImage = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
- using (Graphics graphics = Graphics.FromImage(outputImage))
- {
- graphics.DrawImage(this.pictureBox1.Image, new Rectangle(new Point(), face.Size),
- new Rectangle(new Point(), face.Size), GraphicsUnit.Pixel);
- graphics.DrawImage(hair, new Rectangle(new Point(0, face.Height + 1), hair.Size),
- new Rectangle(new Point(), hair.Size), GraphicsUnit.Pixel);
- }
- pictureBox2.Image = outputImage;
- pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
Advertisement
Add Comment
Please, Sign In to add comment