Browse Source

Update src/ImageSharp/Image.FromBytes.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2180/head
James Jackson-South 4 years ago
committed by GitHub
parent
commit
01e497f569
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Image.FromBytes.cs

2
src/ImageSharp/Image.FromBytes.cs

@ -138,7 +138,7 @@ namespace SixLabors.ImageSharp
public static unsafe Image<TPixel> Load<TPixel>(DecoderOptions options, ReadOnlySpan<byte> data)
where TPixel : unmanaged, IPixel<TPixel>
{
fixed (byte* ptr = &data.GetPinnableReference())
fixed (byte* ptr = data)
{
using var stream = new UnmanagedMemoryStream(ptr, data.Length);
return Load<TPixel>(options, stream);

Loading…
Cancel
Save