Dirk Lemstra
5 years ago
No known key found for this signature in database
GPG Key ID: 57FEA4B5173E68
1 changed files with
1 additions and
13 deletions
-
tests/ImageSharp.Tests/TestUtilities/ReferenceCodecs/MagickReferenceDecoder.cs
|
|
|
@ -7,7 +7,6 @@ using System.Runtime.InteropServices; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using ImageMagick; |
|
|
|
using ImageMagick.Formats.Bmp; |
|
|
|
using SixLabors.ImageSharp.Formats; |
|
|
|
using SixLabors.ImageSharp.Memory; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
@ -55,18 +54,7 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs |
|
|
|
public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream) |
|
|
|
where TPixel : unmanaged, ImageSharp.PixelFormats.IPixel<TPixel> |
|
|
|
{ |
|
|
|
var bmpReadDefines = new BmpReadDefines |
|
|
|
{ |
|
|
|
// See https://github.com/SixLabors/ImageSharp/issues/1380
|
|
|
|
// Validation fails on Ubuntu despite identical header generation
|
|
|
|
// on all platforms.
|
|
|
|
IgnoreFileSize = !TestEnvironment.IsWindows |
|
|
|
}; |
|
|
|
|
|
|
|
var settings = new MagickReadSettings(); |
|
|
|
settings.SetDefines(bmpReadDefines); |
|
|
|
|
|
|
|
using var magickImage = new MagickImage(stream, settings); |
|
|
|
using var magickImage = new MagickImage(stream); |
|
|
|
var result = new Image<TPixel>(configuration, magickImage.Width, magickImage.Height); |
|
|
|
MemoryGroup<TPixel> resultPixels = result.GetRootFramePixelBuffer().FastMemoryGroup; |
|
|
|
|
|
|
|
|