|
|
@ -51,7 +51,7 @@ public class TiffDecoderTests : TiffDecoderBaseTester |
|
|
[InlineData(RgbLzwNoPredictorMultistripMotorola, ImageSharp.ByteOrder.BigEndian)] |
|
|
[InlineData(RgbLzwNoPredictorMultistripMotorola, ImageSharp.ByteOrder.BigEndian)] |
|
|
public void ByteOrder(string imagePath, ByteOrder expectedByteOrder) |
|
|
public void ByteOrder(string imagePath, ByteOrder expectedByteOrder) |
|
|
{ |
|
|
{ |
|
|
var testFile = TestFile.Create(imagePath); |
|
|
TestFile testFile = TestFile.Create(imagePath); |
|
|
using (var stream = new MemoryStream(testFile.Bytes, false)) |
|
|
using (var stream = new MemoryStream(testFile.Bytes, false)) |
|
|
{ |
|
|
{ |
|
|
IImageInfo info = Image.Identify(stream); |
|
|
IImageInfo info = Image.Identify(stream); |
|
|
@ -61,7 +61,7 @@ public class TiffDecoderTests : TiffDecoderBaseTester |
|
|
|
|
|
|
|
|
stream.Seek(0, SeekOrigin.Begin); |
|
|
stream.Seek(0, SeekOrigin.Begin); |
|
|
|
|
|
|
|
|
using var img = Image.Load(stream); |
|
|
using Image img = Image.Load(stream); |
|
|
Assert.Equal(expectedByteOrder, img.Metadata.GetTiffMetadata().ByteOrder); |
|
|
Assert.Equal(expectedByteOrder, img.Metadata.GetTiffMetadata().ByteOrder); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -80,6 +80,14 @@ public class TiffDecoderTests : TiffDecoderBaseTester |
|
|
public void TiffDecoder_CanDecode_Planar<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void TiffDecoder_CanDecode_Planar<TPixel>(TestImageProvider<TPixel> provider) |
|
|
where TPixel : unmanaged, IPixel<TPixel> => TestTiffDecoder(provider); |
|
|
where TPixel : unmanaged, IPixel<TPixel> => TestTiffDecoder(provider); |
|
|
|
|
|
|
|
|
|
|
|
[Theory] |
|
|
|
|
|
[WithFile(Tiled, PixelTypes.Rgba32)] |
|
|
|
|
|
[WithFile(QuadTile, PixelTypes.Rgba32)] |
|
|
|
|
|
[WithFile(TiledChunky, PixelTypes.Rgba32)] |
|
|
|
|
|
[WithFile(TiledPlanar, PixelTypes.Rgba32)] |
|
|
|
|
|
public void TiffDecoder_CanDecode_Tiled<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|
|
|
where TPixel : unmanaged, IPixel<TPixel> => TestTiffDecoder(provider); |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithFile(Rgba8BitPlanarUnassociatedAlpha, PixelTypes.Rgba32)] |
|
|
[WithFile(Rgba8BitPlanarUnassociatedAlpha, PixelTypes.Rgba32)] |
|
|
public void TiffDecoder_CanDecode_Planar_32Bit<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void TiffDecoder_CanDecode_Planar_32Bit<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|