private void btnProcessPic_Click(object sender, EventArgs e) { //First get Category List List <PicCategory> listCategory = PicProcess.GetCategory(tbPicPath.Text, 350); PicProcess.ProcessCategory(tbPicPath.Text, listCategory); }
private void btnTestOne_Click(object sender, EventArgs e) { //Use the first one as an example string sPath = PicProcess.PicFilePath[0]; Bitmap bm = Image.FromFile(sPath) as Bitmap; pic1.Image = bm; Rectangle rect = new Rectangle(0, 0, bm.Size.Width, bm.Size.Height); PixelFormat format = bm.PixelFormat; Bitmap bm2 = bm.Clone(rect, format); pic2.Image = PicProcess.DropNoise(bm2); bm2.Save(sPath + ".png", ImageFormat.Png); }