private void button2_Click(object sender, EventArgs e) { string text = null; try { bool Result = false; //Change the FileName Here System.Drawing.Image img = System.Drawing.Image.FromFile(textBox2.Text); Result = ImageClass.IsImageExistInPDF(textBox1.Text, img, out text); text += "\n\nTemplate Path=" + textBox2.Text + "\n\n"; richTextBox1.Text += text + "\n\n"; if (Result) { MessageBox.Show("Match Found"); } else { MessageBox.Show("Match Not Found"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button3_Click(object sender, EventArgs e) { try { ImageClass.WriteImageFile(textBox1.Text); // write image file } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button4_Click(object sender, EventArgs e) { System.Drawing.Image img1 = System.Drawing.Image.FromFile(textBoxone.Text); System.Drawing.Image img2 = System.Drawing.Image.FromFile(textBoxteo.Text); try { label1.Text = ImageClass.FindComparisonRatioBetweenImages(img1, img2).ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }