Skip to content

Commit ae8e5e4

Browse files
Merge pull request #1573 from SixLabors/af/fix-overload
Image.Load(byte[]) should return non-generic Image
2 parents 36018bd + 583bb6b commit ae8e5e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ImageSharp/Image.FromBytes.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ public static IImageInfo Identify(Configuration configuration, byte[] data, out
9191
/// <param name="data">The byte array containing image data.</param>
9292
/// <exception cref="ArgumentNullException">The configuration is null.</exception>
9393
/// <exception cref="ArgumentNullException">The data is null.</exception>
94-
/// <returns>A new <see cref="Image{Rgba32}"/>.</returns>
95-
public static Image<Rgba32> Load(byte[] data)
96-
=> Load<Rgba32>(Configuration.Default, data);
94+
/// <returns>A new <see cref="Image"/>.</returns>
95+
public static Image Load(byte[] data)
96+
=> Load(Configuration.Default, data);
9797

9898
/// <summary>
9999
/// Load a new instance of <see cref="Image{TPixel}"/> from the given encoded byte array.

tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ public void Decode_WithMaxDimensions_Works<TPixel>(TestImageProvider<TPixel> pro
155155
[Fact]
156156
public void CanDecodeIntermingledImages()
157157
{
158-
using (var kumin1 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes))
158+
using (var kumin1 = Image.Load<Rgba32>(TestFile.Create(TestImages.Gif.Kumin).Bytes))
159159
using (Image.Load(TestFile.Create(TestImages.Png.Icon).Bytes))
160-
using (var kumin2 = Image.Load(TestFile.Create(TestImages.Gif.Kumin).Bytes))
160+
using (var kumin2 = Image.Load<Rgba32>(TestFile.Create(TestImages.Gif.Kumin).Bytes))
161161
{
162162
for (int i = 0; i < kumin1.Frames.Count; i++)
163163
{

0 commit comments

Comments
 (0)