From d1c2172406783ed88b8c1f0358837719f932fd64 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 9 Mar 2021 12:07:47 +0100 Subject: [PATCH 1/2] Image.Load(byte[]) should return non-generic Image --- src/ImageSharp/Image.FromBytes.cs | 4 ++-- tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Image.FromBytes.cs b/src/ImageSharp/Image.FromBytes.cs index 50950c192a..b8b4f056d9 100644 --- a/src/ImageSharp/Image.FromBytes.cs +++ b/src/ImageSharp/Image.FromBytes.cs @@ -92,8 +92,8 @@ public static IImageInfo Identify(Configuration configuration, byte[] data, out /// The configuration is null. /// The data is null. /// A new . - public static Image Load(byte[] data) - => Load(Configuration.Default, data); + public static Image Load(byte[] data) + => Load(Configuration.Default, data); /// /// Load a new instance of from the given encoded byte array. diff --git a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs index 058d669d40..446f1e9d47 100644 --- a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs @@ -155,9 +155,9 @@ public void Decode_WithMaxDimensions_Works(TestImageProvider pro [Fact] public void CanDecodeIntermingledImages() { - using (var kumin1 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes)) + using (var kumin1 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes)) using (Image.Load(TestFile.Create(TestImages.Png.Icon).Bytes)) - using (var kumin2 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes)) + using (var kumin2 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes)) { for (int i = 0; i < kumin1.Frames.Count; i++) { From 583bb6bd6d2a016f0f525f23ba830f1ee2d191cf Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 9 Mar 2021 12:14:09 +0100 Subject: [PATCH 2/2] Also fix "" --- src/ImageSharp/Image.FromBytes.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/Image.FromBytes.cs b/src/ImageSharp/Image.FromBytes.cs index b8b4f056d9..a33a345a0f 100644 --- a/src/ImageSharp/Image.FromBytes.cs +++ b/src/ImageSharp/Image.FromBytes.cs @@ -91,7 +91,7 @@ public static IImageInfo Identify(Configuration configuration, byte[] data, out /// The byte array containing image data. /// The configuration is null. /// The data is null. - /// A new . + /// A new . public static Image Load(byte[] data) => Load(Configuration.Default, data);