private static void Apply(Logo logo, string imagePath) { using (var inputImage = new Bitmap(imagePath)) using (var outputImage = logo.ApplyTo(inputImage)) { var outputPath = GetOutputPath(OutputDirectory, Path.GetFileName(imagePath)); outputImage.Save(outputPath); } }
private void Apply(Logo logo, string imagePath) { using (var inputImage = new Bitmap(imagePath)) using (var outputImage = logo.ApplyTo(inputImage)) { var outputPath = GetOutputPath(OutputDirectory, Path.GetFileName(imagePath)); outputImage.Save(outputPath); DisposeImageFrom(inputPictureBox); ShowImage(imagePath, inputPictureBox); DisposeImageFrom(outputPictureBox); ShowImage(outputPath, outputPictureBox); } }