-
-
Notifications
You must be signed in to change notification settings - Fork 888
Closed
Description
Description
Using an ASP.NET Core 2.0.6 app, I'm getting a thumbnailphoto (bytes array) from our AD and using Image.Load(thumbnailPhoto) to load it in a variable. This produces the error:
"ClassName": "System.MissingMethodException",
"Message": "Method not found: 'System.Span`1<!!1> System.MemoryExtensions.NonPortableCast(System.Span`1<!!0>)'.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at SixLabors.ImageSharp.Memory.ArrayPoolMemoryManager.Buffer`1.get_Span()\r\n at SixLabors.ImageSharp.Image.<>c__DisplayClass0_0.<InternalDetectFormat>b__0(IImageFormatDetector x)\r\n at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()\r\n at System.Linq.Enumerable.TryGetLast[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)\r\n at SixLabors.ImageSharp.Image.InternalDetectFormat(Stream stream, Configuration config)\r\n at SixLabors.ImageSharp.Image.DiscoverDecoder(Stream stream, Configuration config, IImageFormat& format)\r\n at SixLabors.ImageSharp.Image.Decode[TPixel](Stream stream, Configuration config)\r\n at SixLabors.ImageSharp.Image.WithSeekableStream[T](Configuration config, Stream stream, Func`2 action)\r\n at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Stream stream, IImageFormat& format)\r\n at SixLabors.ImageSharp.Image.Load[TPixel](Configuration config, Byte[] data)\r\n at SharePointApi.Controllers.AdController.CreateImageThumbnailWithImageSharp(Byte[] thumbnailPhoto, Int32 width, Int32 height) in F:\\dev\\SharePointApi\\SharePointApi\\Controllers\\AdController.cs:line 174\r\n at SharePointApi.Controllers.AdController.<GetUsersInAdGroup>d__2.MoveNext() in F:\\dev\\SharePointApi\\SharePointApi\\Controllers\\AdController.cs:line 103",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2146233069,
"Source": "SixLabors.ImageSharp",
"WatsonBuckets": null,
"MMClassName": null,
"MMMemberName": null,
"MMSignature": null
}
It is working however in a .NET Framework 4.5.2 app using the SixLabors.ImageSharp version 1.0.0-beta0002 and SixLabors.Core version 1.0.0-beta0004
Steps to Reproduce
- Get a byte array of the thumbnail from AD, saved in the variable:
byte[] thumbnailPhoto - Saving the Image in a variable with:
using (var image = Image.Load(thumbnailPhoto)) - Entering the catch wiht the exception above
System Configuration
- ImageSharp version: tested both 1.0.0-beta0003 and 1.0.0-dev000956
- Other ImageSharp packages and versions:
- Environment (Operating system, version and so on): Windows 10 Enterprise
- .NET Framework version: Microsoft.NetCore.App: 2.0.6 and Microsoft.AspNetCore.All: 2.0.6
- Additional information:
Metadata
Metadata
Assignees
Labels
No labels