private void SaturationAdjustment(object sender, EventArgs e) { UploadedImageBitmap.BM = ImageFilter.AdjustSaturation(UploadedImageBitmap.startBM, trackBar3.Value); UploadedImageBitmap.BM = ImageFilter.AdjustBrightness(UploadedImageBitmap.BM, UploadedImageBitmap.brightness); UploadedImageBitmap.BM = ImageFilter.AdjustContrast(UploadedImageBitmap.BM, UploadedImageBitmap.contrast); pictureBox1.Image = UploadedImageBitmap.BM; UploadedImageBitmap.saturation = trackBar3.Value; UpdateTrackBarTextboxes(UploadedImageBitmap); }
private void LaplacianCompare(object sender, EventArgs e) { bool grayscale = true; Bitmap BM1 = ImageFilter.Laplacian3x3Filter(new Bitmap(pictureBox1.Image), grayscale); Bitmap BM2 = ImageFilter.Laplacian3x3Filter(new Bitmap(pictureBox2.Image), grayscale); ImageFilter.DrawOutlineFromLaplacian(BM1, Color.FromArgb(0, 0, 0), Color.Red); ImageFilter.DrawOutlineFromLaplacian(BM2, Color.FromArgb(0, 0, 0), Color.Red); ImageFilter.ReplaceColor(BM1, Color.FromArgb(0, 0, 0), Color.Empty); ImageFilter.ReplaceColor(BM1, Color.FromArgb(0, 0, 0), Color.Empty); pictureBox1.Image = BM1; pictureBox2.Image = BM2; textBox1.Text = ImageManipulation.CompareImages(BM1, BM2).ToString(); }
private void button2_Clik(object sender, EventArgs e) { workingImage = new Bitmap(ImageFilter.FilteredImage(workingImage)); pictureBox2.Image = workingImage; }
private void rotate_Click(object sender, EventArgs e) { chosenImage = new Bitmap(ImageFilter.RotateImage90CW(chosenImage)); pictureBox2.Image = chosenImage; }
private void trackBar2_Scroll(object sender, EventArgs e) { workingImage = ImageFilter.adjustContrast(chosenImage, trackBar2.Value); pictureBox2.Image = workingImage; }
private void trackBar1_Scroll(object sender, EventArgs e) { workingImage = ImageFilter.adjustBrightness(chosenImage, trackBar1.Value); pictureBox2.Image = workingImage; }
private void Negative_click(object sender, EventArgs e) { pictureBox1.Image = ImageFilter.DrawAsNegative(DefaultImage); }
private void Sepia_click(object sender, EventArgs e) { pictureBox1.Image = ImageFilter.DrawAsSepiaTone(DefaultImage); }
private void Grayscale_click(object sender, EventArgs e) { pictureBox1.Image = ImageFilter.DrawAsGrayscale(DefaultImage); }
private void Rotate90CW(object sender, EventArgs e) { UploadedImageBitmap.BM = new Bitmap(ImageFilter.RotateImage90CW(pictureBox1.Image)); pictureBox1.Image = UploadedImageBitmap.BM; }
private void SuggestedFilterBoxClick(object sender, EventArgs e) { pictureBox5.Image = ImageFilter.SuggestedFilter(UploadedImageBitmap); pictureBox1.Image = pictureBox5.Image; }
private void Negative_click(object sender, EventArgs e) { UploadedImageBitmap.BM = ImageFilter.DrawAsNegative(UploadedImageBitmap.BM); pictureBox1.Image = UploadedImageBitmap.BM; }
private void Sepia_click(object sender, EventArgs e) { UploadedImageBitmap.BM = ImageFilter.DrawAsSepiaTone(UploadedImageBitmap.BM); pictureBox1.Image = UploadedImageBitmap.BM; }