From 11ffe9be571f6ebe7d17ff894ebff7cdd6b1270b Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Mon, 13 Feb 2017 08:12:56 +0000 Subject: [PATCH] fix vars --- src/ImageSharp/Image/Image{TColor}.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Image/Image{TColor}.cs b/src/ImageSharp/Image/Image{TColor}.cs index ded3e376e..75d855ad4 100644 --- a/src/ImageSharp/Image/Image{TColor}.cs +++ b/src/ImageSharp/Image/Image{TColor}.cs @@ -254,8 +254,8 @@ namespace ImageSharp /// The public Image Save(string filePath) { - var ext = Path.GetExtension(filePath).Trim('.'); - var format = this.Configuration.ImageFormats.SingleOrDefault(f => f.SupportedExtensions.Contains(ext, StringComparer.OrdinalIgnoreCase)); + string ext = Path.GetExtension(filePath).Trim('.'); + IImageFormat format = this.Configuration.ImageFormats.SingleOrDefault(f => f.SupportedExtensions.Contains(ext, StringComparer.OrdinalIgnoreCase)); if (format == null) { throw new InvalidOperationException($"No image formats have been registered for the file extension '{ext}'."); @@ -274,7 +274,7 @@ namespace ImageSharp public Image Save(string filePath, IImageFormat format) { Guard.NotNull(format, nameof(format)); - using (var fs = File.Create(filePath)) + using (FileStream fs = File.Create(filePath)) { return this.Save(fs, format); } @@ -290,7 +290,7 @@ namespace ImageSharp public Image Save(string filePath, IImageEncoder encoder) { Guard.NotNull(encoder, nameof(encoder)); - using (var fs = File.Create(filePath)) + using (FileStream fs = File.Create(filePath)) { return this.Save(fs, encoder); }