From 0ace64794a001cd97b4ab4100e14f9a152c7b5cb Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 19 Feb 2017 19:02:21 +0100 Subject: [PATCH] Added options argument to the filePath overloads. --- src/ImageSharp/Image/Image{TColor}.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Image/Image{TColor}.cs b/src/ImageSharp/Image/Image{TColor}.cs index d8890f5fa..69b99ce13 100644 --- a/src/ImageSharp/Image/Image{TColor}.cs +++ b/src/ImageSharp/Image/Image{TColor}.cs @@ -261,9 +261,10 @@ namespace ImageSharp /// Saves the image to the given stream using the currently loaded image format. /// /// The file path to save the image to. + /// The options for the encoder. /// Thrown if the stream is null. /// The - public Image Save(string filePath) + public Image Save(string filePath, IEncoderOptions options = null) { string ext = Path.GetExtension(filePath).Trim('.'); IImageFormat format = this.Configuration.ImageFormats.SingleOrDefault(f => f.SupportedExtensions.Contains(ext, StringComparer.OrdinalIgnoreCase)); @@ -280,9 +281,10 @@ namespace ImageSharp /// /// The file path to save the image to. /// The format to save the image as. + /// The options for the encoder. /// Thrown if the format is null. /// The - public Image Save(string filePath, IImageFormat format) + public Image Save(string filePath, IImageFormat format, IEncoderOptions options = null) { Guard.NotNull(format, nameof(format)); using (FileStream fs = File.Create(filePath)) @@ -296,9 +298,10 @@ namespace ImageSharp /// /// The file path to save the image to. /// The encoder to save the image with. + /// The options for the encoder. /// Thrown if the encoder is null. /// The - public Image Save(string filePath, IImageEncoder encoder) + public Image Save(string filePath, IImageEncoder encoder, IEncoderOptions options = null) { Guard.NotNull(encoder, nameof(encoder)); using (FileStream fs = File.Create(filePath))