Browse Source

Refactor Tiff decoder tests: split large "testall" test into smaller ones

pull/1457/head
Brian Popow 6 years ago
parent
commit
440ac499de
  1. 2
      tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs
  2. 2
      tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs
  3. 2
      tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs
  4. 2
      tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs
  5. 2
      tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs
  6. 117
      tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs
  7. 2
      tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs
  8. 14
      tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderTests.cs
  9. 2
      tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs
  10. 2
      tests/ImageSharp.Tests/Formats/Tiff/TiffMetadataTests.cs
  11. 2
      tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs
  12. 2
      tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs
  13. 19
      tests/ImageSharp.Tests/TestImages.cs
  14. BIN
      tests/Images/Input/Tiff/rgb_deflate.tiff
  15. BIN
      tests/Images/Input/Tiff/rgb_deflate_predictor.tiff
  16. BIN
      tests/Images/Input/Tiff/rgb_palette.tiff
  17. BIN
      tests/Images/Input/Tiff/rgb_palette_deflate.tiff

2
tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs

@ -8,7 +8,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class DeflateTiffCompressionTests public class DeflateTiffCompressionTests
{ {
[Theory] [Theory]

2
tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs

@ -10,7 +10,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class LzwTiffCompressionTests public class LzwTiffCompressionTests
{ {
[Theory] [Theory]

2
tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs

@ -7,7 +7,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class NoneTiffCompressionTests public class NoneTiffCompressionTests
{ {
[Theory] [Theory]

2
tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs

@ -11,7 +11,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Compression
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class PackBitsTiffCompressionTests public class PackBitsTiffCompressionTests
{ {
[Theory] [Theory]

2
tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs

@ -9,7 +9,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public abstract class PhotometricInterpretationTestBase public abstract class PhotometricInterpretationTestBase
{ {
public static Rgba32 DefaultColor = new Rgba32(42, 96, 18, 128); public static Rgba32 DefaultColor = new Rgba32(42, 96, 18, 128);

117
tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs

@ -14,21 +14,20 @@ using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs;
using Xunit; using Xunit;
using static SixLabors.ImageSharp.Tests.TestImages.Tiff;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff.BlackBox.Decoder")] [Trait("Format", "Tiff")]
[Trait("Category", "Tiff")]
public class TiffDecoderTests public class TiffDecoderTests
{ {
private static TiffDecoder TiffDecoder => new TiffDecoder(); public static readonly string[] MultiframeTestImages = Multiframes;
private static MagickReferenceDecoder ReferenceDecoder => new MagickReferenceDecoder();
public static readonly string[] SingleTestImages = TestImages.Tiff.All; public static readonly string[] NotSupportedImages = NotSupported;
public static readonly string[] MultiframeTestImages = TestImages.Tiff.Multiframes; private static TiffDecoder TiffDecoder => new TiffDecoder();
public static readonly string[] NotSupportedImages = TestImages.Tiff.NotSupported; private static MagickReferenceDecoder ReferenceDecoder => new MagickReferenceDecoder();
[Theory] [Theory]
[WithFileCollection(nameof(NotSupportedImages), PixelTypes.Rgba32)] [WithFileCollection(nameof(NotSupportedImages), PixelTypes.Rgba32)]
@ -72,7 +71,6 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff
Assert.NotNull(info.Metadata); Assert.NotNull(info.Metadata);
Assert.Equal(expectedByteOrder, info.Metadata.GetTiffMetadata().ByteOrder); Assert.Equal(expectedByteOrder, info.Metadata.GetTiffMetadata().ByteOrder);
// todo: it's not a mistake?
stream.Seek(0, SeekOrigin.Begin); stream.Seek(0, SeekOrigin.Begin);
using var img = Image.Load(stream); using var img = Image.Load(stream);
@ -81,15 +79,78 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff
} }
[Theory] [Theory]
[WithFileCollection(nameof(SingleTestImages), PixelTypes.Rgba32)] [WithFile(RgbUncompressed, PixelTypes.Rgba32)]
public void Decode<TPixel>(TestImageProvider<TPixel> provider) [WithFile(Calliphora_GrayscaleUncompressed, PixelTypes.Rgba32)]
where TPixel : unmanaged, IPixel<TPixel> [WithFile(Calliphora_RgbUncompressed, PixelTypes.Rgba32)]
[WithFile(Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_Uncompressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{ {
using (Image<TPixel> image = provider.GetImage(TiffDecoder)) TestTiffDecoder(provider);
{ }
image.DebugSave(provider);
image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder); [Theory]
} [WithFile(Calliphora_PaletteUncompressed, PixelTypes.Rgba32)]
[WithFile(RgbPalette, PixelTypes.Rgba32)]
[WithFile(RgbPaletteDeflate, PixelTypes.Rgba32)]
[WithFile(PaletteUncompressed, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_WithPalette<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
}
[Theory]
[WithFile(Calliphora_GrayscaleDeflate, PixelTypes.Rgba32)]
[WithFile(Calliphora_GrayscaleDeflate_Predictor, PixelTypes.Rgba32)]
[WithFile(Calliphora_RgbDeflate_Predictor, PixelTypes.Rgba32)]
[WithFile(RgbDeflate, PixelTypes.Rgba32)]
[WithFile(RgbDeflatePredictor, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_DeflateCompressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
}
[Theory]
[WithFile(RgbLzwPredictor, PixelTypes.Rgba32)]
[WithFile(RgbLzwNoPredictor, PixelTypes.Rgba32)]
[WithFile(Calliphora_RgbLzw_Predictor, PixelTypes.Rgba32)]
[WithFile(SmallRgbLzw, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_LzwCompressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
}
[Theory]
[WithFile(HuffmanRleAllTermCodes, PixelTypes.Rgba32)]
[WithFile(HuffmanRleAllMakeupCodes, PixelTypes.Rgba32)]
[WithFile(HuffmanRle_basi3p02, PixelTypes.Rgba32)]
[WithFile(Calliphora_HuffmanCompressed, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_HuffmanCompressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
}
[Theory]
[WithFile(CcittFax3AllTermCodes, PixelTypes.Rgba32)]
[WithFile(CcittFax3AllMakeupCodes, PixelTypes.Rgba32)]
[WithFile(Calliphora_Fax3Compressed, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_Fax3Compressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
}
[Theory]
[WithFile(Calliphora_RgbPackbits, PixelTypes.Rgba32)]
[WithFile(RgbPackbits, PixelTypes.Rgba32)]
public void TiffDecoder_CanDecode_PackBitsCompressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
TestTiffDecoder(provider);
} }
[Theory] [Theory]
@ -97,16 +158,22 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff
public void DecodeMultiframe<TPixel>(TestImageProvider<TPixel> provider) public void DecodeMultiframe<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> where TPixel : unmanaged, IPixel<TPixel>
{ {
using (Image<TPixel> image = provider.GetImage(TiffDecoder)) using Image<TPixel> image = provider.GetImage(TiffDecoder);
{ Assert.True(image.Frames.Count > 1);
Assert.True(image.Frames.Count > 1);
image.DebugSave(provider); image.DebugSave(provider);
image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder); image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder);
image.DebugSaveMultiFrame(provider); image.DebugSaveMultiFrame(provider);
image.CompareToOriginalMultiFrame(provider, ImageComparer.Exact, ReferenceDecoder); image.CompareToOriginalMultiFrame(provider, ImageComparer.Exact, ReferenceDecoder);
} }
private static void TestTiffDecoder<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(TiffDecoder);
image.DebugSave(provider);
image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder);
} }
} }
} }

2
tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs

@ -11,7 +11,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class TiffEncoderHeaderTests public class TiffEncoderHeaderTests
{ {
private static readonly MemoryAllocator MemoryAllocator = new ArrayPoolMemoryAllocator(); private static readonly MemoryAllocator MemoryAllocator = new ArrayPoolMemoryAllocator();

14
tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderTests.cs

@ -13,7 +13,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class TiffEncoderTests public class TiffEncoderTests
{ {
private static readonly IImageDecoder ReferenceDecoder = new MagickReferenceDecoder(); private static readonly IImageDecoder ReferenceDecoder = new MagickReferenceDecoder();
@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff
public static readonly TheoryData<string, TiffBitsPerPixel> TiffBitsPerPixelFiles = public static readonly TheoryData<string, TiffBitsPerPixel> TiffBitsPerPixelFiles =
new TheoryData<string, TiffBitsPerPixel> new TheoryData<string, TiffBitsPerPixel>
{ {
{ TestImages.Tiff.Calliphora_BiColor, TiffBitsPerPixel.Pixel1 }, { TestImages.Tiff.Calliphora_BiColorUncompressed, TiffBitsPerPixel.Pixel1 },
{ TestImages.Tiff.GrayscaleUncompressed, TiffBitsPerPixel.Pixel8 }, { TestImages.Tiff.GrayscaleUncompressed, TiffBitsPerPixel.Pixel8 },
{ TestImages.Tiff.RgbUncompressed, TiffBitsPerPixel.Pixel24 }, { TestImages.Tiff.RgbUncompressed, TiffBitsPerPixel.Pixel24 },
}; };
@ -131,27 +131,27 @@ namespace SixLabors.ImageSharp.Tests.Formats.Tiff
} }
[Theory] [Theory]
[WithFile(TestImages.Tiff.Calliphora_BiColor, PixelTypes.Rgba32)] [WithFile(TestImages.Tiff.Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffEncoder_EncodeBiColor_Works<TPixel>(TestImageProvider<TPixel> provider) public void TiffEncoder_EncodeBiColor_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel24, TiffEncodingMode.BiColor); where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel24, TiffEncodingMode.BiColor);
[Theory] [Theory]
[WithFile(TestImages.Tiff.Calliphora_BiColor, PixelTypes.Rgba32)] [WithFile(TestImages.Tiff.Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffEncoder_EncodeBiColor_WithDeflateCompression_Works<TPixel>(TestImageProvider<TPixel> provider) public void TiffEncoder_EncodeBiColor_WithDeflateCompression_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.Deflate); where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.Deflate);
[Theory] [Theory]
[WithFile(TestImages.Tiff.Calliphora_BiColor, PixelTypes.Rgba32)] [WithFile(TestImages.Tiff.Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffEncoder_EncodeBiColor_WithPackBitsCompression_Works<TPixel>(TestImageProvider<TPixel> provider) public void TiffEncoder_EncodeBiColor_WithPackBitsCompression_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.PackBits); where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.PackBits);
[Theory] [Theory]
[WithFile(TestImages.Tiff.Calliphora_BiColor, PixelTypes.Rgba32)] [WithFile(TestImages.Tiff.Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffEncoder_EncodeBiColor_WithCcittGroup3FaxCompression_Works<TPixel>(TestImageProvider<TPixel> provider) public void TiffEncoder_EncodeBiColor_WithCcittGroup3FaxCompression_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.CcittGroup3Fax); where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.CcittGroup3Fax);
[Theory] [Theory]
[WithFile(TestImages.Tiff.Calliphora_BiColor, PixelTypes.Rgba32)] [WithFile(TestImages.Tiff.Calliphora_BiColorUncompressed, PixelTypes.Rgba32)]
public void TiffEncoder_EncodeBiColor_WithModifiedHuffmanCompression_Works<TPixel>(TestImageProvider<TPixel> provider) public void TiffEncoder_EncodeBiColor_WithModifiedHuffmanCompression_Works<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.ModifiedHuffman); where TPixel : unmanaged, IPixel<TPixel> => TestTiffEncoderCore(provider, TiffBitsPerPixel.Pixel1, TiffEncodingMode.BiColor, TiffEncoderCompression.ModifiedHuffman);

2
tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs

@ -6,7 +6,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class TiffFormatTests public class TiffFormatTests
{ {
[Fact] [Fact]

2
tests/ImageSharp.Tests/Formats/Tiff/TiffMetadataTests.cs

@ -10,7 +10,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class TiffMetadataTests public class TiffMetadataTests
{ {
public static readonly string[] MetadataImages = TestImages.Tiff.Metadata; public static readonly string[] MetadataImages = TestImages.Tiff.Metadata;

2
tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs

@ -10,7 +10,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff namespace SixLabors.ImageSharp.Tests.Formats.Tiff
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class SubStreamTests public class SubStreamTests
{ {
[Fact] [Fact]

2
tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs

@ -10,7 +10,7 @@ using Xunit;
namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Utils namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Utils
{ {
[Trait("Category", "Tiff")] [Trait("Format", "Tiff")]
public class TiffWriterTests public class TiffWriterTests
{ {
private static readonly MemoryAllocator MemoryAllocator = new ArrayPoolMemoryAllocator(); private static readonly MemoryAllocator MemoryAllocator = new ArrayPoolMemoryAllocator();

19
tests/ImageSharp.Tests/TestImages.cs

@ -515,7 +515,7 @@ namespace SixLabors.ImageSharp.Tests
public const string Calliphora_RgbUncompressed = "Tiff/Calliphora_rgb_uncompressed.tiff"; public const string Calliphora_RgbUncompressed = "Tiff/Calliphora_rgb_uncompressed.tiff";
public const string Calliphora_Fax3Compressed = "Tiff/Calliphora_ccitt_fax3.tiff"; public const string Calliphora_Fax3Compressed = "Tiff/Calliphora_ccitt_fax3.tiff";
public const string Calliphora_HuffmanCompressed = "Tiff/Calliphora_huffman_rle.tiff"; public const string Calliphora_HuffmanCompressed = "Tiff/Calliphora_huffman_rle.tiff";
public const string Calliphora_BiColor = "Tiff/Calliphora_bicolor_uncompressed.tiff"; public const string Calliphora_BiColorUncompressed = "Tiff/Calliphora_bicolor_uncompressed.tiff";
public const string CcittFax3AllTermCodes = "Tiff/ccitt_fax3_all_terminating_codes.tiff"; public const string CcittFax3AllTermCodes = "Tiff/ccitt_fax3_all_terminating_codes.tiff";
public const string CcittFax3AllMakeupCodes = "Tiff/ccitt_fax3_all_makeup_codes.tiff"; public const string CcittFax3AllMakeupCodes = "Tiff/ccitt_fax3_all_makeup_codes.tiff";
@ -529,7 +529,8 @@ namespace SixLabors.ImageSharp.Tests
public const string GrayscaleUncompressed = "Tiff/grayscale_uncompressed.tiff"; public const string GrayscaleUncompressed = "Tiff/grayscale_uncompressed.tiff";
public const string PaletteDeflateMultistrip = "Tiff/palette_grayscale_deflate_multistrip.tiff"; public const string PaletteDeflateMultistrip = "Tiff/palette_grayscale_deflate_multistrip.tiff";
public const string PaletteUncompressed = "Tiff/palette_uncompressed.tiff"; public const string PaletteUncompressed = "Tiff/palette_uncompressed.tiff";
public const string RgbDeflatePredictor = "Tiff/rgb_deflate.tiff"; public const string RgbDeflate = "Tiff/rgb_deflate.tiff";
public const string RgbDeflatePredictor = "Tiff/rgb_deflate_predictor.tiff";
public const string RgbDeflateMultistrip = "Tiff/rgb_deflate_multistrip.tiff"; public const string RgbDeflateMultistrip = "Tiff/rgb_deflate_multistrip.tiff";
public const string RgbJpeg = "Tiff/rgb_jpeg.tiff"; public const string RgbJpeg = "Tiff/rgb_jpeg.tiff";
public const string RgbLzwPredictor = "Tiff/rgb_lzw_predictor.tiff"; public const string RgbLzwPredictor = "Tiff/rgb_lzw_predictor.tiff";
@ -541,6 +542,8 @@ namespace SixLabors.ImageSharp.Tests
public const string RgbPackbits = "Tiff/rgb_packbits.tiff"; public const string RgbPackbits = "Tiff/rgb_packbits.tiff";
public const string RgbPackbitsMultistrip = "Tiff/rgb_packbits_multistrip.tiff"; public const string RgbPackbitsMultistrip = "Tiff/rgb_packbits_multistrip.tiff";
public const string RgbUncompressed = "Tiff/rgb_uncompressed.tiff"; public const string RgbUncompressed = "Tiff/rgb_uncompressed.tiff";
public const string RgbPalette = "Tiff/rgb_palette.tiff";
public const string RgbPaletteDeflate = "Tiff/rgb_palette_deflate.tiff";
public const string SmallRgbDeflate = "Tiff/rgb_small_deflate.tiff"; public const string SmallRgbDeflate = "Tiff/rgb_small_deflate.tiff";
public const string SmallRgbLzw = "Tiff/rgb_small_lzw.tiff"; public const string SmallRgbLzw = "Tiff/rgb_small_lzw.tiff";
@ -555,18 +558,6 @@ namespace SixLabors.ImageSharp.Tests
public const string SampleMetadata = "Tiff/metadata_sample.tiff"; public const string SampleMetadata = "Tiff/metadata_sample.tiff";
public static readonly string[] All =
{
Calliphora_PaletteUncompressed, Calliphora_RgbPackbits,
Calliphora_GrayscaleDeflate_Predictor, Calliphora_RgbDeflate_Predictor, RgbDeflatePredictor,
Calliphora_RgbLzw_Predictor, RgbLzwPredictor, // TODO: Undoing the horizontal prediction seems to fail for lzw. Do we need to do something different for lzw?
Calliphora_BiColor, Calliphora_RgbUncompressed, Calliphora_HuffmanCompressed, Calliphora_Fax3Compressed, CcittFax3AllTermCodes, CcittFax3AllMakeupCodes,
HuffmanRleAllTermCodes, HuffmanRleAllMakeupCodes, HuffmanRle_basi3p02, GrayscaleDeflateMultistrip, Calliphora_GrayscaleDeflate, Calliphora_GrayscaleUncompressed,
GrayscaleUncompressed, PaletteDeflateMultistrip, PaletteUncompressed, RgbDeflateMultistrip, /*RgbJpeg,*/ /* RgbLzwMultistrip_Predictor,*/
RgbLzwNoPredictorMultistrip, RgbLzwNoPredictorMultistripMotorola, RgbLzwNoPredictorSinglestripMotorola, RgbPackbits, RgbPackbitsMultistrip, RgbUncompressed,
/* MultiframeLzw_Predictor, MultiFrameDifferentVariants, SampleMetadata,*/ SmallRgbDeflate, SmallRgbLzw, RgbLzwNoPredictor
};
public static readonly string[] Multiframes = { MultiframeDeflateWithPreview /*MultiframeLzw_Predictor, MultiFrameDifferentSize, MultiframeDifferentSizeTiled, MultiFrameDifferentVariants,*/ }; public static readonly string[] Multiframes = { MultiframeDeflateWithPreview /*MultiframeLzw_Predictor, MultiFrameDifferentSize, MultiframeDifferentSizeTiled, MultiFrameDifferentVariants,*/ };
public static readonly string[] Metadata = { SampleMetadata }; public static readonly string[] Metadata = { SampleMetadata };

BIN
tests/Images/Input/Tiff/rgb_deflate.tiff

Binary file not shown.

BIN
tests/Images/Input/Tiff/rgb_deflate_predictor.tiff

Binary file not shown.

BIN
tests/Images/Input/Tiff/rgb_palette.tiff

Binary file not shown.

BIN
tests/Images/Input/Tiff/rgb_palette_deflate.tiff

Binary file not shown.
Loading…
Cancel
Save