/// <summary> /// Save uncompressed image. /// </summary> private void btnSaveUncompressedImage_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.FileName = "uncompressed.png"; sfd.DefaultExt = ".png"; sfd.Filter = "Images (*.png)|*.png"; sfd.Title = "Choose where to save your image"; sfd.InitialDirectory = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName, "Content\\Images"); if (sfd.ShowDialog() == DialogResult.OK) { _defaultWriter.Write(sfd.FileName, imgComparisonControl.TransformedImage.GetBitmap()); } }
/// <summary> /// Executed when Transformed image is about to be saved. /// Save Image. /// </summary> private void ImgComparison_ImageAboutToBeSaved(object sender, Controls.ImageComparisonControl.ImageChosenEventArgs e) { DefaultImageWriter writer = new DefaultImageWriter(); writer.Write(e.FileName, imgComparison.TransformedImage.GetBitmap()); }