Cam-Cording_Snapshot_Pixel-.../Part 2 - Take a Snapshot/Snapshot.cs
Muhammad Anas Rashid dc74d52a7d All Files
2016-03-18 23:51:00 +05:00

32 lines
744 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HCI_Assignment_2
{
public partial class Snapshot : Form
{
public Snapshot(Bitmap picture)
{
pictureBox1 = new PictureBox();
pictureBox1.Height = 480;
pictureBox1.Width = 640;
pictureBox1.BackgroundImage = (Bitmap)picture.Clone();
}
private void button1_Click(object sender, EventArgs e)
{
if (pictureBox1.Image != null)
pictureBox1.Image.Save("snapshot.jpg");
}
}
}