public WinForm(IPictureIO pictureIO, IFilter pictureManipulation, IEdge edge) { //Instenciate interfaces this.pictureIO = pictureIO; this.pictureManipulation = pictureManipulation; this.edge = edge; }
private void btnLoad_Click(object sender, EventArgs e) { //Call classes needed this.pictureIO = new PictureIO(); this.edge = new Edge(); originalBitmap = pictureIO.openPicture(); previewBitmap = originalBitmap; //Size in the picture box previewBitmap = edge.CopyToSquareCanvas(previewBitmap, pictureBox1.Width); //Put the picture in the picture box pictureBox1.Image = previewBitmap; ApplyFilter(); }
private void btnSave_Click(object sender, EventArgs e) { this.pictureIO = new PictureIO(); pictureIO.savePicture(resultBitmap); }