Skip to content

Image.Load(byte[]) throws Method not found System.ReadOnlySpan.get_Item(Int32) #447

@0xGeorgii

Description

@0xGeorgii

Description

Image.Load on method below throws Method not found: '!0 System.ReadOnlySpan1.get_Item(Int32)'.` with the stack trace

   at SixLabors.ImageSharp.Formats.Bmp.BmpImageFormatDetector.IsSupportedFileFormat(ReadOnlySpan`1 header)
   at SixLabors.ImageSharp.Formats.Bmp.BmpImageFormatDetector.DetectFormat(ReadOnlySpan`1 header)
   at SixLabors.ImageSharp.Image.<>c__DisplayClass0_0.<InternalDetectFormat>b__0(IImageFormatDetector x)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetLast[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
   at SixLabors.ImageSharp.Image.InternalDetectFormat(Stream stream, Configuration config)
   at SixLabors.ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)
   at SixLabors.ImageSharp.Image.WithSeekableStream[T](Stream stream, Func`2 action)
   at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)
   at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Byte[] data)
   at SourceProvider.Network.SrcLoader.<DownloadImageAsync>d__1.MoveNext() in D:\GitHub\ImageBlendingAlgorithms\ImageBlendingAlgorithms\SourceProvider\Network\SrcLoader.cs:line 26
--- End of stack trace from previous location where exception was thrown ---
   at DesktopUI.MainWindow.<StartButtonHandle>d__11.MoveNext() in D:\GitHub\ImageBlendingAlgorithms\ImageBlendingAlgorithms\DesktopUI\MainWindow.xaml.cs:line 96

Steps to Reproduce

        public static async Task<Image<Rgba32>> DownloadImageAsync(uint x, uint y)
        {
            var data = await DownloadSrcAsync(x, y);
            return Image.Load(data);
        }
  • ImageSharp version: 1.0.0-beta0002
  • Environment (Operating system, version and so on): win10-x64
  • .NET Framework version: netcore2.1

1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions