diff --git a/.gitattributes b/.gitattributes index c0bff6e18..f605a871c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -82,6 +82,8 @@ *.tga binary *.ttc binary *.ttf binary +*.tif binary +*.tiff binary *.webp binary *.woff binary *.woff2 binary diff --git a/src/ImageSharp/Advanced/AotCompilerTools.cs b/src/ImageSharp/Advanced/AotCompilerTools.cs index 2ea456286..7cd6dac09 100644 --- a/src/ImageSharp/Advanced/AotCompilerTools.cs +++ b/src/ImageSharp/Advanced/AotCompilerTools.cs @@ -94,6 +94,8 @@ namespace SixLabors.ImageSharp.Advanced AotCodec(new Formats.Bmp.BmpDecoder(), new Formats.Bmp.BmpEncoder()); AotCodec(new Formats.Gif.GifDecoder(), new Formats.Gif.GifEncoder()); AotCodec(new Formats.Jpeg.JpegDecoder(), new Formats.Jpeg.JpegEncoder()); + AotCodec(new Formats.Tga.TgaDecoder(), new Formats.Tga.TgaEncoder()); + AotCodec(new Formats.Tiff.TiffDecoder(), new Formats.Tiff.TiffEncoder()); // TODO: Do the discovery work to figure out what works and what doesn't. } diff --git a/src/ImageSharp/Configuration.cs b/src/ImageSharp/Configuration.cs index 3ed61aa6c..854a5d69c 100644 --- a/src/ImageSharp/Configuration.cs +++ b/src/ImageSharp/Configuration.cs @@ -181,6 +181,7 @@ namespace SixLabors.ImageSharp /// /// . /// . + /// /// /// The default configuration of . internal static Configuration CreateDefaultInstance() @@ -190,7 +191,8 @@ namespace SixLabors.ImageSharp new JpegConfigurationModule(), new GifConfigurationModule(), new BmpConfigurationModule(), - new TgaConfigurationModule()); + new TgaConfigurationModule(), + new TiffConfigurationModule()); } } } diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoder.cs b/src/ImageSharp/Formats/Tiff/TiffDecoder.cs index ba52e4266..e4bfc666a 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoder.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoder.cs @@ -24,7 +24,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff { Guard.NotNull(stream, "stream"); - using (TiffDecoderCore decoder = new TiffDecoderCore(configuration, this)) + using (var decoder = new TiffDecoderCore(configuration, this)) { return decoder.Decode(stream); } @@ -37,11 +37,13 @@ namespace SixLabors.ImageSharp.Formats.Tiff } /// - public Task> DecodeAsync(Configuration configuration, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel + public Task> DecodeAsync(Configuration configuration, Stream stream, CancellationToken cancellationToken) + where TPixel : unmanaged, IPixel { throw new System.NotImplementedException(); } + /// public Task DecodeAsync(Configuration configuration, Stream stream, CancellationToken cancellationToken) { throw new System.NotImplementedException(); diff --git a/tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs b/tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs index 2a01c60a1..7e42f1bee 100644 --- a/tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs +++ b/tests/ImageSharp.Benchmarks/Codecs/DecodeTiff.cs @@ -1,52 +1,51 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -using System.Drawing; using System.IO; - using BenchmarkDotNet.Attributes; - using SixLabors.ImageSharp.PixelFormats; - -using CoreImage = SixLabors.ImageSharp.Image; -using CoreSize = SixLabors.ImageSharp.Size; +using SixLabors.ImageSharp.Tests; +using SDImage = System.Drawing.Image; +using SDSize = System.Drawing.Size; namespace SixLabors.ImageSharp.Benchmarks.Codecs { + [Config(typeof(Config.ShortClr))] public class DecodeTiff : BenchmarkBase { private byte[] tiffBytes; + private string TestImageFullPath => Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, this.TestImage); + + [Params(TestImages.Tiff.RgbLzw)] + public string TestImage { get; set; } + [GlobalSetup] public void ReadImages() { if (this.tiffBytes == null) { - this.tiffBytes = File.ReadAllBytes("../ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_uncompressed.tiff"); + this.tiffBytes = File.ReadAllBytes(this.TestImageFullPath); } } [Benchmark(Baseline = true, Description = "System.Drawing Tiff")] - public System.Drawing.Size TiffSystemDrawing() + public SDSize TiffSystemDrawing() { - using (MemoryStream memoryStream = new MemoryStream(this.tiffBytes)) + using (var memoryStream = new MemoryStream(this.tiffBytes)) + using (var image = SDImage.FromStream(memoryStream)) { - using (var image = System.Drawing.Image.FromStream(memoryStream)) - { - return image.Size; - } + return image.Size; } } [Benchmark(Description = "ImageSharp Tiff")] - public CoreSize TiffCore() + public Size TiffCore() { - using (MemoryStream memoryStream = new MemoryStream(this.tiffBytes)) + using (var memoryStream = new MemoryStream(this.tiffBytes)) + using (var image = Image.Load(memoryStream)) { - using (Image image = CoreImage.Load(memoryStream)) - { - return new CoreSize(image.Width, image.Height); - } + return image.Size(); } } } diff --git a/tests/ImageSharp.Benchmarks/Codecs/DecodeTiffBig.cs b/tests/ImageSharp.Benchmarks/Codecs/DecodeTiffBig.cs new file mode 100644 index 000000000..c7c1020ef --- /dev/null +++ b/tests/ImageSharp.Benchmarks/Codecs/DecodeTiffBig.cs @@ -0,0 +1,76 @@ +// Copyright (c) Six Labors. +// Licensed under the Apache License, Version 2.0. + +using System.IO; + +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Environments; +using BenchmarkDotNet.Jobs; +using BenchmarkDotNet.Reports; +using SixLabors.ImageSharp.PixelFormats; +using SixLabors.ImageSharp.Tests; +using SDImage = System.Drawing.Image; +using SDSize = System.Drawing.Size; + +namespace SixLabors.ImageSharp.Benchmarks.Codecs +{ + [Config(typeof(DecodeTiffBig.Config.LongClr))] + public class DecodeTiffBig : BenchmarkBase + { + private class Config : SixLabors.ImageSharp.Benchmarks.Config + { + public class LongClr : Config + { + public LongClr() + { + this.Add( + Job.Default.With(ClrRuntime.Net472).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(5), + Job.Default.With(CoreRuntime.Core31).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(5), + Job.Default.With(CoreRuntime.Core21).WithLaunchCount(1).WithWarmupCount(3).WithIterationCount(5)); + + this.SummaryStyle = SummaryStyle.Default.WithMaxParameterColumnWidth(60); + } + } + } + + private string prevImage = null; + + private byte[] data; + + private string TestImageFullPath => Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, this.TestImage); + + [Params(TestImages.Tiff.Benchmark_GrayscaleUncompressed, TestImages.Tiff.Benchmark_PaletteUncompressed, TestImages.Tiff.Benchmark_RgbDeflate, TestImages.Tiff.Benchmark_RgbLzw, TestImages.Tiff.Benchmark_RgbPackbits, TestImages.Tiff.Benchmark_RgbUncompressed)] + // [Params(TestImages.Tiff.GrayscaleUncompressed, TestImages.Tiff.PaletteUncompressed, TestImages.Tiff.RgbDeflate, TestImages.Tiff.RgbLzw, TestImages.Tiff.RgbPackbits, TestImages.Tiff.RgbUncompressed)] + public string TestImage { get; set; } + + [IterationSetup] + public void ReadImages() + { + if (this.prevImage != this.TestImage) + { + this.data = File.ReadAllBytes(this.TestImageFullPath); + this.prevImage = this.TestImage; + } + } + + [Benchmark(Baseline = true, Description = "System.Drawing Tiff")] + public SDSize TiffSystemDrawing() + { + using (var memoryStream = new MemoryStream(this.data)) + using (var image = SDImage.FromStream(memoryStream)) + { + return image.Size; + } + } + + [Benchmark(Description = "ImageSharp Tiff")] + public Size TiffCore() + { + using (var ms = new MemoryStream(this.data)) + using (var image = Image.Load(ms)) + { + return image.Size(); + } + } + } +} diff --git a/tests/ImageSharp.Tests/FileTestBase.cs b/tests/ImageSharp.Tests/FileTestBase.cs index 93024197b..cf5f87e66 100644 --- a/tests/ImageSharp.Tests/FileTestBase.cs +++ b/tests/ImageSharp.Tests/FileTestBase.cs @@ -22,7 +22,9 @@ namespace SixLabors.ImageSharp.Tests TestImages.Bmp.Car, TestImages.Jpeg.Baseline.Calliphora, TestImages.Png.Splash, - TestImages.Gif.Trans + TestImages.Gif.Trans, + TestImages.Tga.Bit24PalRleTopRight, + TestImages.Tiff.RgbLzw, }; /// @@ -64,6 +66,10 @@ namespace SixLabors.ImageSharp.Tests public const string Png = "png"; public const string Gif = "gif"; + + public const string Tga = "tga"; + + public const string Tiff = "tiff"; } /// @@ -109,6 +115,8 @@ namespace SixLabors.ImageSharp.Tests // TestFile.Create(TestImages.Gif.Trans), // Perf: Enable for local testing only // TestFile.Create(TestImages.Gif.Cheers), // Perf: Enable for local testing only // TestFile.Create(TestImages.Gif.Giphy) // Perf: Enable for local testing only + TestFile.Create(TestImages.Tga.Bit24PalRleTopRight), + TestFile.Create(TestImages.Tiff.RgbLzw), }; #pragma warning restore SA1515 // Single-line comment should be preceded by blank line } diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs new file mode 100644 index 000000000..b4d2a4894 --- /dev/null +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderTests.cs @@ -0,0 +1,35 @@ +// Copyright (c) Six Labors and contributors. +// Licensed under the Apache License, Version 2.0. + +// ReSharper disable InconsistentNaming + + +using System.IO; +using SixLabors.ImageSharp.Formats; +using SixLabors.ImageSharp.Formats.Png; +using SixLabors.ImageSharp.Formats.Tiff; +using SixLabors.ImageSharp.PixelFormats; +using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison; +using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; +using Xunit; + +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff.BlackBox")] + public class TiffDecoderTests + { + public static readonly string[] CommonTestImages = TestImages.Tiff.All; + + [Theory] + [WithFileCollection(nameof(CommonTestImages), PixelTypes.Rgba32)] + public void Decode(TestImageProvider provider) + where TPixel : unmanaged, IPixel + { + using (Image image = provider.GetImage(new TiffDecoder())) + { + image.DebugSave(provider); + image.CompareToOriginal(provider, ImageComparer.Exact, new MagickReferenceDecoder()); + } + } + } +} diff --git a/tests/ImageSharp.Tests/TestImages.cs b/tests/ImageSharp.Tests/TestImages.cs index fd5296c37..74967f3ec 100644 --- a/tests/ImageSharp.Tests/TestImages.cs +++ b/tests/ImageSharp.Tests/TestImages.cs @@ -490,5 +490,54 @@ namespace SixLabors.ImageSharp.Tests public const string NoAlphaBits32Bit = "Tga/32bit_no_alphabits.tga"; public const string NoAlphaBits32BitRle = "Tga/32bit_rle_no_alphabits.tga"; } + + public static class Tiff + { + public const string Benchmark_GrayscaleUncompressed = "Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff"; + public const string Benchmark_PaletteUncompressed = "Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff"; + public const string Benchmark_RgbDeflate = "Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff"; + public const string Benchmark_RgbLzw = "Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff"; + public const string Benchmark_RgbPackbits = "Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff"; + public const string Benchmark_RgbUncompressed = "Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff"; + + public const string Calliphora_GrayscaleUncompressed = "Tiff/Calliphora_grayscale_uncompressed.tiff"; + public const string Calliphora_PaletteUncompressed = "Tiff/Calliphora_palette_uncompressed.tiff"; + public const string Calliphora_RgbDeflate = "Tiff/Calliphora_rgb_deflate.tiff"; + public const string Calliphora_RgbJpeg = "Tiff/Calliphora_rgb_jpeg.tiff"; + public const string Calliphora_RgbLzw = "Tiff/Calliphora_rgb_lzw.tiff"; + public const string Calliphora_RgbPackbits = "Tiff/Calliphora_rgb_packbits.tiff"; + public const string Calliphora_RgbUncompressed = "Tiff/Calliphora_rgb_uncompressed.tiff"; + + public const string GrayscaleDeflateMultistrip = "Tiff/grayscale_deflate_multistrip.tiff"; + public const string GrayscaleUncompressed = "Tiff/grayscale_uncompressed.tiff"; + public const string PaletteDeflateMultistrip = "Tiff/palette_grayscale_deflate_multistrip.tiff"; + public const string PaletteUncompressed = "Tiff/palette_uncompressed.tiff"; + public const string RgbDeflate = "Tiff/rgb_deflate.tiff"; + public const string RgbDeflateMultistrip = "Tiff/rgb_deflate_multistrip.tiff"; + public const string RgbJpeg = "Tiff/rgb_jpeg.tiff"; + public const string RgbLzw = "Tiff/rgb_lzw.tiff"; + public const string RgbLzwMultistrip = "Tiff/rgb_lzw_multistrip.tiff"; + public const string RgbPackbits = "Tiff/rgb_packbits.tiff"; + public const string RgbPackbitsMultistrip = "Tiff/rgb_packbits_multistrip.tiff"; + public const string RgbUncompressed = "Tiff/rgb_uncompressed.tiff"; + + public const string RgbUncompressedTiled = "Tiff/rgb_uncompressed_tiled.tiff"; + public const string MultiframeDifferentSizeTiled = "Tiff/multipage_ withPreview_differentSize_tiled.tiff"; + + public const string MultiframeLzw = "Tiff/multipage_lzw.tiff"; + public const string MultiframeDeflateWithPreview = "Tiff/multipage_deflate_withPreview.tiff"; + public const string MultiframeDifferentSize = "Tiff/multipage_differentSize.tiff"; + public const string MultiframeDifferentVariants = "Tiff/multipage_differentVariants.tiff"; + + public const string SampleMetadata = "Tiff/metadata_sample.tiff"; + + public static readonly string[] All = { Calliphora_GrayscaleUncompressed, Calliphora_PaletteUncompressed, Calliphora_RgbDeflate, Calliphora_RgbLzw, Calliphora_RgbPackbits, Calliphora_RgbUncompressed, GrayscaleDeflateMultistrip, GrayscaleUncompressed, PaletteDeflateMultistrip, PaletteUncompressed, RgbDeflate, RgbDeflateMultistrip, /*RgbJpeg,*/ RgbLzw, RgbLzwMultistrip, RgbPackbits, RgbPackbitsMultistrip, RgbUncompressed, MultiframeLzw, /*MultiFrameDifferentVariants,*/ SampleMetadata, }; + + public static readonly string[] Multiframes = { MultiframeLzw, MultiframeDeflateWithPreview /*MultiFrameDifferentSize, MultiframeDifferentSizeTiled, MultiFrameDifferentVariants,*/ }; + + public static readonly string[] Metadata = { SampleMetadata }; + + public static readonly string[] NotSupported = { Calliphora_RgbJpeg, RgbJpeg, RgbUncompressedTiled, MultiframeDifferentSize, MultiframeDifferentVariants }; + } } } diff --git a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.Formats.cs b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.Formats.cs index 6e204e2d4..1bcacc4de 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.Formats.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestEnvironment.Formats.cs @@ -9,6 +9,7 @@ using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Png; using SixLabors.ImageSharp.Formats.Tga; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.Tests.TestUtilities.ReferenceCodecs; namespace SixLabors.ImageSharp.Tests @@ -55,7 +56,9 @@ namespace SixLabors.ImageSharp.Tests var cfg = new Configuration( new JpegConfigurationModule(), new GifConfigurationModule(), - new TgaConfigurationModule()); + new TgaConfigurationModule(), + new TiffConfigurationModule() + ); // Magick codecs should work on all platforms IImageEncoder pngEncoder = IsWindows ? (IImageEncoder)SystemDrawingReferenceEncoder.Png : new PngEncoder(); diff --git a/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report-github.md b/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report-github.md new file mode 100644 index 000000000..68b149c50 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report-github.md @@ -0,0 +1,69 @@ +``` ini + +BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.450 (2004/?/20H1) +Intel Core i7-3610QM CPU 2.30GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores +.NET Core SDK=3.1.401 + [Host] : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT + Job-MTZTUC : .NET Framework 4.8 (4.8.4200.0), X64 RyuJIT + Job-BGVYTJ : .NET Core 2.1.21 (CoreCLR 4.6.29130.01, CoreFX 4.6.29130.02), X64 RyuJIT + Job-ZDUDFU : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT + +InvocationCount=1 IterationCount=5 LaunchCount=1 +UnrollFactor=1 WarmupCount=3 + +``` +| Method | Job | Runtime | TestImage | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated | +|---------------------- |----------- |-------------- |-------------------------------------------------------- |------------:|------------:|------------:|-------:|--------:|------------:|----------:|----------:|-------------:| +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff** | **180.2 ms** | **15.21 ms** | **2.35 ms** | **1.00** | **0.00** | **85000.0000** | **-** | **-** | **269221840 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff | 31,527.8 ms | 4,371.70 ms | 1,135.32 ms | 176.11 | 8.81 | 1000.0000 | 1000.0000 | 1000.0000 | 1342029912 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff | 185.5 ms | 15.88 ms | 2.46 ms | 1.00 | 0.00 | 85000.0000 | - | - | 268813936 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff | 17,768.7 ms | 116.03 ms | 30.13 ms | 95.84 | 1.13 | 1000.0000 | 1000.0000 | 1000.0000 | 1342016464 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff | 149.9 ms | 8.23 ms | 1.27 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff | 16,782.2 ms | 718.14 ms | 111.13 ms | 111.94 | 0.80 | 1000.0000 | 1000.0000 | 1000.0000 | 1342016440 B | +| | | | | | | | | | | | | | +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff** | **178.0 ms** | **7.07 ms** | **1.83 ms** | **1.00** | **0.00** | **85000.0000** | **-** | **-** | **269221840 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff | 33,721.9 ms | 78.03 ms | 12.08 ms | 188.96 | 1.80 | 1000.0000 | 1000.0000 | 1000.0000 | 1342023280 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff | 180.1 ms | 8.81 ms | 2.29 ms | 1.00 | 0.00 | 85000.0000 | - | - | 268815616 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff | 22,941.4 ms | 728.12 ms | 189.09 ms | 127.37 | 1.07 | 1000.0000 | 1000.0000 | 1000.0000 | 1342022368 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff | 145.5 ms | 3.20 ms | 0.50 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff | 21,485.0 ms | 711.10 ms | 184.67 ms | 148.04 | 0.66 | 1000.0000 | 1000.0000 | 1000.0000 | 1342025632 B | +| | | | | | | | | | | | | | +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff** | **2,518.2 ms** | **76.22 ms** | **19.79 ms** | **1.00** | **0.00** | **6000.0000** | **-** | **-** | **29598616 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff | 29,327.2 ms | 102.72 ms | 26.68 ms | 11.65 | 0.10 | 1000.0000 | 1000.0000 | 1000.0000 | 1124088224 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff | 2,500.3 ms | 67.24 ms | 10.41 ms | 1.00 | 0.00 | 6000.0000 | - | - | 29528752 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff | 18,974.7 ms | 199.58 ms | 30.89 ms | 7.59 | 0.04 | 1000.0000 | 1000.0000 | 1000.0000 | 1123947608 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff | 2,541.1 ms | 21.36 ms | 5.55 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff | 17,974.8 ms | 751.73 ms | 116.33 ms | 7.07 | 0.04 | 1000.0000 | 1000.0000 | 1000.0000 | 1123949960 B | +| | | | | | | | | | | | | | +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff** | **3,368.4 ms** | **40.71 ms** | **6.30 ms** | **1.00** | **0.00** | **4000.0000** | **-** | **-** | **22835824 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff | 28,919.9 ms | 705.58 ms | 183.24 ms | 8.57 | 0.04 | 1000.0000 | 1000.0000 | 1000.0000 | 1123956384 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff | 3,365.1 ms | 36.93 ms | 5.72 ms | 1.00 | 0.00 | 4000.0000 | - | - | 22789840 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff | 17,905.1 ms | 40.08 ms | 10.41 ms | 5.32 | 0.01 | 1000.0000 | 1000.0000 | 1000.0000 | 1123949072 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff | 3,377.6 ms | 125.36 ms | 32.56 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff | 16,998.0 ms | 460.59 ms | 119.61 ms | 5.03 | 0.07 | 1000.0000 | 1000.0000 | 1000.0000 | 1123952144 B | +| | | | | | | | | | | | | | +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff** | **1,849.3 ms** | **43.52 ms** | **11.30 ms** | **1.00** | **0.00** | **255000.0000** | **-** | **-** | **812350880 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff | 29,360.0 ms | 157.78 ms | 40.98 ms | 15.88 | 0.12 | - | - | - | 2690323752 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff | 1,882.7 ms | 64.85 ms | 16.84 ms | 1.00 | 0.00 | 255000.0000 | - | - | 811943568 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff | 18,967.7 ms | 445.86 ms | 115.79 ms | 10.08 | 0.09 | - | - | - | 2690318648 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff | 1,743.2 ms | 78.50 ms | 20.39 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff | 17,379.6 ms | 243.53 ms | 63.24 ms | 9.97 | 0.10 | - | - | - | 2690321912 B | +| | | | | | | | | | | | | | +| **'System.Drawing Tiff'** | **Job-MTZTUC** | **.NET 4.7.2** | **Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff** | **758.5 ms** | **9.75 ms** | **2.53 ms** | **1.00** | **0.00** | **255000.0000** | **-** | **-** | **806059984 B** | +| 'ImageSharp Tiff' | Job-MTZTUC | .NET 4.7.2 | Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff | 29,198.2 ms | 677.81 ms | 176.03 ms | 38.50 | 0.19 | - | - | - | 1878827096 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff | 760.1 ms | 15.95 ms | 2.47 ms | 1.00 | 0.00 | 255000.0000 | - | - | 805652192 B | +| 'ImageSharp Tiff' | Job-BGVYTJ | .NET Core 2.1 | Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff | 18,457.2 ms | 35.60 ms | 5.51 ms | 24.28 | 0.08 | - | - | - | 1878821992 B | +| | | | | | | | | | | | | | +| 'System.Drawing Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff | 629.5 ms | 11.40 ms | 2.96 ms | 1.00 | 0.00 | - | - | - | 176 B | +| 'ImageSharp Tiff' | Job-ZDUDFU | .NET Core 3.1 | Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff | 17,579.8 ms | 371.72 ms | 96.54 ms | 27.93 | 0.11 | - | - | - | 1878825256 B | diff --git a/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report.html b/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report.html new file mode 100644 index 000000000..406b72819 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-report.html @@ -0,0 +1,69 @@ + + + + +SixLabors.ImageSharp.Benchmarks.Codecs.DecodeTiffBig-20200824-095044 + + + + +

+BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.450 (2004/?/20H1)
+Intel Core i7-3610QM CPU 2.30GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
+.NET Core SDK=3.1.401
+  [Host]     : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT
+  Job-MTZTUC : .NET Framework 4.8 (4.8.4200.0), X64 RyuJIT
+  Job-BGVYTJ : .NET Core 2.1.21 (CoreCLR 4.6.29130.01, CoreFX 4.6.29130.02), X64 RyuJIT
+  Job-ZDUDFU : .NET Core 3.1.7 (CoreCLR 4.700.20.36602, CoreFX 4.700.20.37001), X64 RyuJIT
+
+
InvocationCount=1  IterationCount=5  LaunchCount=1  
+UnrollFactor=1  WarmupCount=3  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method JobRuntime TestImage MeanErrorStdDevRatioRatioSDGen 0Gen 1Gen 2Allocated
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff180.2 ms15.21 ms2.35 ms1.000.0085000.0000--269221840 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff31,527.8 ms4,371.70 ms1,135.32 ms176.118.811000.00001000.00001000.00001342029912 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff185.5 ms15.88 ms2.46 ms1.000.0085000.0000--268813936 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff17,768.7 ms116.03 ms30.13 ms95.841.131000.00001000.00001000.00001342016464 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff149.9 ms8.23 ms1.27 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_grayscale_uncompressed.tiff16,782.2 ms718.14 ms111.13 ms111.940.801000.00001000.00001000.00001342016440 B
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff178.0 ms7.07 ms1.83 ms1.000.0085000.0000--269221840 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff33,721.9 ms78.03 ms12.08 ms188.961.801000.00001000.00001000.00001342023280 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff180.1 ms8.81 ms2.29 ms1.000.0085000.0000--268815616 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff22,941.4 ms728.12 ms189.09 ms127.371.071000.00001000.00001000.00001342022368 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff145.5 ms3.20 ms0.50 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_palette_uncompressed.tiff21,485.0 ms711.10 ms184.67 ms148.040.661000.00001000.00001000.00001342025632 B
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff2,518.2 ms76.22 ms19.79 ms1.000.006000.0000--29598616 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff29,327.2 ms102.72 ms26.68 ms11.650.101000.00001000.00001000.00001124088224 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff2,500.3 ms67.24 ms10.41 ms1.000.006000.0000--29528752 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff18,974.7 ms199.58 ms30.89 ms7.590.041000.00001000.00001000.00001123947608 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff2,541.1 ms21.36 ms5.55 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_deflate.tiff17,974.8 ms751.73 ms116.33 ms7.070.041000.00001000.00001000.00001123949960 B
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff3,368.4 ms40.71 ms6.30 ms1.000.004000.0000--22835824 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff28,919.9 ms705.58 ms183.24 ms8.570.041000.00001000.00001000.00001123956384 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff3,365.1 ms36.93 ms5.72 ms1.000.004000.0000--22789840 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff17,905.1 ms40.08 ms10.41 ms5.320.011000.00001000.00001000.00001123949072 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff3,377.6 ms125.36 ms32.56 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_lzw.tiff16,998.0 ms460.59 ms119.61 ms5.030.071000.00001000.00001000.00001123952144 B
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff1,849.3 ms43.52 ms11.30 ms1.000.00255000.0000--812350880 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff29,360.0 ms157.78 ms40.98 ms15.880.12---2690323752 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff1,882.7 ms64.85 ms16.84 ms1.000.00255000.0000--811943568 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff18,967.7 ms445.86 ms115.79 ms10.080.09---2690318648 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff1,743.2 ms78.50 ms20.39 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_packbits.tiff17,379.6 ms243.53 ms63.24 ms9.970.10---2690321912 B
'System.Drawing Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff758.5 ms9.75 ms2.53 ms1.000.00255000.0000--806059984 B
'ImageSharp Tiff'Job-MTZTUC.NET 4.7.2Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff29,198.2 ms677.81 ms176.03 ms38.500.19---1878827096 B
'System.Drawing Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff760.1 ms15.95 ms2.47 ms1.000.00255000.0000--805652192 B
'ImageSharp Tiff'Job-BGVYTJ.NET Core 2.1Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff18,457.2 ms35.60 ms5.51 ms24.280.08---1878821992 B
'System.Drawing Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff629.5 ms11.40 ms2.96 ms1.000.00---176 B
'ImageSharp Tiff'Job-ZDUDFU.NET Core 3.1Tiff/Benchmarks/jpeg444_big_rgb_uncompressed.tiff17,579.8 ms371.72 ms96.54 ms27.930.11---1878825256 B
+ + diff --git a/tests/Images/Input/Tiff/Benchmarks/gen.bat b/tests/Images/Input/Tiff/Benchmarks/gen.bat new file mode 100644 index 000000000..3a0a032c1 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/gen.bat @@ -0,0 +1,2 @@ +powershell -executionpolicy RemoteSigned -file gen_big.ps1 +powershell -executionpolicy RemoteSigned -file gen_medium.ps1 diff --git a/tests/Images/Input/Tiff/Benchmarks/gen_big.ps1 b/tests/Images/Input/Tiff/Benchmarks/gen_big.ps1 new file mode 100644 index 000000000..b824bd463 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/gen_big.ps1 @@ -0,0 +1,12 @@ +$Gm_Exe = "C:\Program Files\ImageMagick-7.0.8-Q16\magick.exe" +$Source_Image = ".\jpeg444_big.jpg" +$Output_Prefix = ".\jpeg444_big" + +& $Gm_Exe convert $Source_Image -compress None -type TrueColor $Output_Prefix"_rgb_uncompressed.tiff" +& $Gm_Exe convert $Source_Image -compress LZW -type TrueColor $Output_Prefix"_rgb_lzw.tiff" +& $Gm_Exe convert $Source_Image -compress RLE -type TrueColor $Output_Prefix"_rgb_packbits.tiff" +& $Gm_Exe convert $Source_Image -compress JPEG -type TrueColor $Output_Prefix"_rgb_jpeg.tiff" +& $Gm_Exe convert $Source_Image -compress Zip -type TrueColor $Output_Prefix"_rgb_deflate.tiff" + +& $Gm_Exe convert $Source_Image -compress None -type Grayscale $Output_Prefix"_grayscale_uncompressed.tiff" +& $Gm_Exe convert $Source_Image -compress None -colors 256 $Output_Prefix"_palette_uncompressed.tiff" \ No newline at end of file diff --git a/tests/Images/Input/Tiff/Benchmarks/gen_medium.ps1 b/tests/Images/Input/Tiff/Benchmarks/gen_medium.ps1 new file mode 100644 index 000000000..2cd631c28 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/gen_medium.ps1 @@ -0,0 +1,12 @@ +$Gm_Exe = "C:\Program Files\ImageMagick-7.0.8-Q16\magick.exe" +$Source_Image = ".\jpeg444_medium.jpg" +$Output_Prefix = ".\jpeg444_medium" + +& $Gm_Exe convert $Source_Image -compress None -type TrueColor $Output_Prefix"_rgb_uncompressed.tiff" +& $Gm_Exe convert $Source_Image -compress LZW -type TrueColor $Output_Prefix"_rgb_lzw.tiff" +& $Gm_Exe convert $Source_Image -compress RLE -type TrueColor $Output_Prefix"_rgb_packbits.tiff" +& $Gm_Exe convert $Source_Image -compress JPEG -type TrueColor $Output_Prefix"_rgb_jpeg.tiff" +& $Gm_Exe convert $Source_Image -compress Zip -type TrueColor $Output_Prefix"_rgb_deflate.tiff" + +& $Gm_Exe convert $Source_Image -compress None -type Grayscale $Output_Prefix"_grayscale_uncompressed.tiff" +& $Gm_Exe convert $Source_Image -compress None -colors 256 $Output_Prefix"_palette_uncompressed.tiff" \ No newline at end of file diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/genimages.ps1 b/tests/Images/Input/Tiff/Benchmarks/genimages.ps1 similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/genimages.ps1 rename to tests/Images/Input/Tiff/Benchmarks/genimages.ps1 diff --git a/tests/Images/Input/Tiff/Benchmarks/jpeg444.jpg b/tests/Images/Input/Tiff/Benchmarks/jpeg444.jpg new file mode 100644 index 000000000..1887fa4a5 --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/jpeg444.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89c632bbc42bc917f81e7c47595c95cb914a619604ac07b8cebf6fd4d1d744ca +size 5667 diff --git a/tests/Images/Input/Tiff/Benchmarks/jpeg444_big.jpg b/tests/Images/Input/Tiff/Benchmarks/jpeg444_big.jpg new file mode 100644 index 000000000..650aff92b --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/jpeg444_big.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf48ba72885b98b9d05f1e4bed2e85f5db1db04b0206fc8160a9da2367f4467c +size 1984946 diff --git a/tests/Images/Input/Tiff/Benchmarks/jpeg444_medium.jpg b/tests/Images/Input/Tiff/Benchmarks/jpeg444_medium.jpg new file mode 100644 index 000000000..0300c67ab --- /dev/null +++ b/tests/Images/Input/Tiff/Benchmarks/jpeg444_medium.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75cdf78efd14c880f26d5009e087df06e772b000edddbb404e7098177f895ac1 +size 525610 diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_grayscale_uncompressed.tiff b/tests/Images/Input/Tiff/Calliphora_grayscale_uncompressed.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_grayscale_uncompressed.tiff rename to tests/Images/Input/Tiff/Calliphora_grayscale_uncompressed.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_palette_uncompressed.tiff b/tests/Images/Input/Tiff/Calliphora_palette_uncompressed.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_palette_uncompressed.tiff rename to tests/Images/Input/Tiff/Calliphora_palette_uncompressed.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_deflate.tiff b/tests/Images/Input/Tiff/Calliphora_rgb_deflate.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_deflate.tiff rename to tests/Images/Input/Tiff/Calliphora_rgb_deflate.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_jpeg.tiff b/tests/Images/Input/Tiff/Calliphora_rgb_jpeg.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_jpeg.tiff rename to tests/Images/Input/Tiff/Calliphora_rgb_jpeg.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_lzw.tiff b/tests/Images/Input/Tiff/Calliphora_rgb_lzw.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_lzw.tiff rename to tests/Images/Input/Tiff/Calliphora_rgb_lzw.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_packbits.tiff b/tests/Images/Input/Tiff/Calliphora_rgb_packbits.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_packbits.tiff rename to tests/Images/Input/Tiff/Calliphora_rgb_packbits.tiff diff --git a/tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_uncompressed.tiff b/tests/Images/Input/Tiff/Calliphora_rgb_uncompressed.tiff similarity index 100% rename from tests/ImageSharp.Tests/TestImages/Formats/Tiff/Calliphora_rgb_uncompressed.tiff rename to tests/Images/Input/Tiff/Calliphora_rgb_uncompressed.tiff diff --git a/tests/Images/Input/Tiff/grayscale_deflate_multistrip.tiff b/tests/Images/Input/Tiff/grayscale_deflate_multistrip.tiff new file mode 100644 index 000000000..6e57bb56e --- /dev/null +++ b/tests/Images/Input/Tiff/grayscale_deflate_multistrip.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aaee95d80f1e9eb9afbb7447da78a685f29359181ce71c045cff3aacda28a916 +size 14530 diff --git a/tests/Images/Input/Tiff/grayscale_uncompressed.tiff b/tests/Images/Input/Tiff/grayscale_uncompressed.tiff new file mode 100644 index 000000000..570edfc6d --- /dev/null +++ b/tests/Images/Input/Tiff/grayscale_uncompressed.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fefe6f6e1daf270546848c23ef437cfd072abb812e539fbab1006d74d416e9a4 +size 65758 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_deflate.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_deflate.png new file mode 100644 index 000000000..e49bf1073 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:087d7479ebe3bdd95281584cf4c9582603d90e157d136cf4233dcdefd909ba73 +size 1696927 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_lzw.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_lzw.png new file mode 100644 index 000000000..891a2ace6 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_Calliphora_rgb_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14f7b8e8275b4488418e4403c31e1a5c7565bf062fbd962f09f7a665468e2481 +size 7358 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_metadata_sample.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_metadata_sample.png new file mode 100644 index 000000000..9eb1808f2 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_metadata_sample.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91c87bc3d75b1386b30990513fab2da26bad065b977108904e866c850d66a7e5 +size 197 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_multipage_lzw.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_multipage_lzw.png new file mode 100644 index 000000000..a6642e716 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_multipage_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:727356bf611957750a0427bda4582f9ecc0f8935884f2158e8a2d5e65c3469b4 +size 18278 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_deflate.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_deflate.png new file mode 100644 index 000000000..9e95173bc --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b077fb63012967c39c5a0b1b515ada33ad5470160ad0fa1aa89581aa77238c82 +size 18237 diff --git a/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_lzw_multistrip.png b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_lzw_multistrip.png new file mode 100644 index 000000000..9dcd861ec --- /dev/null +++ b/tests/Images/Input/Tiff/issues/net472/Decode_Rgba32_rgb_lzw_multistrip.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d82fec289ce819c51fcb00d7eee662afc2d7357c940154e651e9e5ebf8a0287 +size 91898 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_deflate.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_deflate.png new file mode 100644 index 000000000..415f73d87 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beb1b3f0229c9a1ed78d4c1ab3cd786d96d70b904398ba008f1aa4157862554c +size 1696925 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_lzw.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_lzw.png new file mode 100644 index 000000000..36dcfd9e8 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_Calliphora_rgb_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c74fae7a00dbf00bc259851b1e9c774a10fac2bd8581397d8680ebc47a7d0340 +size 31982 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_metadata_sample.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_metadata_sample.png new file mode 100644 index 000000000..96cbbca22 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_metadata_sample.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5727c4007787bf0d6af78763c94125029255e41ebe570a6b8f3cbdb65e2a4d5f +size 1488 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_multipage_lzw.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_multipage_lzw.png new file mode 100644 index 000000000..575e6cd56 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_multipage_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d788e1facd4ee5cea5c57caa8b38a26a45fc8423b9967e9348f0514d734524f +size 18278 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_deflate.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_deflate.png new file mode 100644 index 000000000..82d582e77 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9adbd0ce357c08c7b5ef543ff81bc32d227f9c2a016965f110f68c032f640ff1 +size 18237 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_lzw_multistrip.png b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_lzw_multistrip.png new file mode 100644 index 000000000..9dcd861ec --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp2.1/Decode_Rgba32_rgb_lzw_multistrip.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d82fec289ce819c51fcb00d7eee662afc2d7357c940154e651e9e5ebf8a0287 +size 91898 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_deflate.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_deflate.png new file mode 100644 index 000000000..415f73d87 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beb1b3f0229c9a1ed78d4c1ab3cd786d96d70b904398ba008f1aa4157862554c +size 1696925 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_lzw.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_lzw.png new file mode 100644 index 000000000..a79ae6096 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_Calliphora_rgb_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4acb6da968aa5bfc7af57b41fe9aefe13e7b2d3ee4379867b83548209fbc94eb +size 8108 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_metadata_sample.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_metadata_sample.png new file mode 100644 index 000000000..249f68831 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_metadata_sample.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:977c552ee08788244fa4579c23ca59dfcb6e91df706774dc8167286a4ce5a536 +size 821 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_multipage_lzw.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_multipage_lzw.png new file mode 100644 index 000000000..575e6cd56 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_multipage_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d788e1facd4ee5cea5c57caa8b38a26a45fc8423b9967e9348f0514d734524f +size 18278 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_deflate.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_deflate.png new file mode 100644 index 000000000..82d582e77 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_deflate.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9adbd0ce357c08c7b5ef543ff81bc32d227f9c2a016965f110f68c032f640ff1 +size 18237 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw.png new file mode 100644 index 000000000..c0da2eb59 --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24fe217e11cbc2944e7a8aba0411e37314822024e90fdd873cd9e3feb0e55898 +size 77527 diff --git a/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw_multistrip.png b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw_multistrip.png new file mode 100644 index 000000000..61d88337b --- /dev/null +++ b/tests/Images/Input/Tiff/issues/netcoreapp3.1/Decode_Rgba32_rgb_lzw_multistrip.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82f30f2936880eacc3248fbc759f84adac7d625b974259d61aeed16bc00f01b9 +size 64056 diff --git a/tests/Images/Input/Tiff/issues/readme.md b/tests/Images/Input/Tiff/issues/readme.md new file mode 100644 index 000000000..1616a432c --- /dev/null +++ b/tests/Images/Input/Tiff/issues/readme.md @@ -0,0 +1,2 @@ +SixLabors.ImageSharp.Tests.Formats.Tiff.TiffDecoderTests.Decode +damaged output files \ No newline at end of file diff --git a/tests/Images/Input/Tiff/metadata_sample.tiff b/tests/Images/Input/Tiff/metadata_sample.tiff new file mode 100644 index 000000000..aac5fe2c4 --- /dev/null +++ b/tests/Images/Input/Tiff/metadata_sample.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea7bc7404614a90da555637f6fed88defe5c6be8b5d1da2ff5980c39d249a01b +size 8833 diff --git a/tests/Images/Input/Tiff/multipage_ withPreview_differentSize_tiled.tiff b/tests/Images/Input/Tiff/multipage_ withPreview_differentSize_tiled.tiff new file mode 100644 index 000000000..164740c4a --- /dev/null +++ b/tests/Images/Input/Tiff/multipage_ withPreview_differentSize_tiled.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e5ef9ccff292ed33a352cd040326c1ceeefc2cd68aedf0598dbff8326deecf6 +size 113784 diff --git a/tests/Images/Input/Tiff/multipage_deflate_withPreview.tiff b/tests/Images/Input/Tiff/multipage_deflate_withPreview.tiff new file mode 100644 index 000000000..4a4db4524 --- /dev/null +++ b/tests/Images/Input/Tiff/multipage_deflate_withPreview.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63360eb1e383d0d3830155a269c4b5f4b07f3a2cb386f18427ea1c5ae5f1817a +size 160015 diff --git a/tests/Images/Input/Tiff/multipage_differentSize.tiff b/tests/Images/Input/Tiff/multipage_differentSize.tiff new file mode 100644 index 000000000..7caa44710 --- /dev/null +++ b/tests/Images/Input/Tiff/multipage_differentSize.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8476813a4c68883872a8a196f567a567d2351802f86114aef0c64e9786a7d8b9 +size 210533 diff --git a/tests/Images/Input/Tiff/multipage_differentVariants.tiff b/tests/Images/Input/Tiff/multipage_differentVariants.tiff new file mode 100644 index 000000000..9bbb84d8b --- /dev/null +++ b/tests/Images/Input/Tiff/multipage_differentVariants.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e54681a90093f0f613299eabf01db60ac971c96d26d281db01873b2cb9fb2d09 +size 483062 diff --git a/tests/Images/Input/Tiff/multipage_lzw.tiff b/tests/Images/Input/Tiff/multipage_lzw.tiff new file mode 100644 index 000000000..d2595dcdc --- /dev/null +++ b/tests/Images/Input/Tiff/multipage_lzw.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da86a6d5fa61609edb54ef9118be16d89488f0cfce0acd16990e68b685f76094 +size 43432 diff --git a/tests/Images/Input/Tiff/palette_grayscale_deflate_multistrip.tiff b/tests/Images/Input/Tiff/palette_grayscale_deflate_multistrip.tiff new file mode 100644 index 000000000..d68c53483 --- /dev/null +++ b/tests/Images/Input/Tiff/palette_grayscale_deflate_multistrip.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6b269e44539ea2e36f6357941c97a158ee288a7b44dab35338c241de69b5d37 +size 16078 diff --git a/tests/Images/Input/Tiff/palette_uncompressed.tiff b/tests/Images/Input/Tiff/palette_uncompressed.tiff new file mode 100644 index 000000000..b282d65b5 --- /dev/null +++ b/tests/Images/Input/Tiff/palette_uncompressed.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75f1bcaff7dc09ddbe6ded7b764b8c0b17bffc3392bafdc7bc7a4c7d616a38e5 +size 67394 diff --git a/tests/Images/Input/Tiff/rgb_deflate.tiff b/tests/Images/Input/Tiff/rgb_deflate.tiff new file mode 100644 index 000000000..97623cd5b --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_deflate.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1db70e0cfb056cfc675db3a2b85a1f226c53cd70275808773ff580c738b3db1 +size 3158 diff --git a/tests/Images/Input/Tiff/rgb_deflate_multistrip.tiff b/tests/Images/Input/Tiff/rgb_deflate_multistrip.tiff new file mode 100644 index 000000000..dc9b36a9f --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_deflate_multistrip.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb8375584d0ba70626f0026bf91306c423a6c00f511362a3ce523cefb1e65d56 +size 68058 diff --git a/tests/Images/Input/Tiff/rgb_jpeg.tiff b/tests/Images/Input/Tiff/rgb_jpeg.tiff new file mode 100644 index 000000000..b198d1aba --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_jpeg.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa7f77e16bc51a55f5d2cb8d162801ea9edc620e16ec7ab43323f3c994830399 +size 5736 diff --git a/tests/Images/Input/Tiff/rgb_lzw.tiff b/tests/Images/Input/Tiff/rgb_lzw.tiff new file mode 100644 index 000000000..a1d3d77f4 --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_lzw.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fe0ad0f383136e32f45c922de530ebcbce055f99ca81ef1d50608e241ea621c +size 25806 diff --git a/tests/Images/Input/Tiff/rgb_lzw_multistrip.tiff b/tests/Images/Input/Tiff/rgb_lzw_multistrip.tiff new file mode 100644 index 000000000..6cfc803bb --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_lzw_multistrip.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55ecb81526b238ca4a43b559a33a3b393b9776fe32fd2f3b78a1b460780f7ba9 +size 26962 diff --git a/tests/Images/Input/Tiff/rgb_packbits.tiff b/tests/Images/Input/Tiff/rgb_packbits.tiff new file mode 100644 index 000000000..28310cade --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_packbits.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c5c7996d78fb97a43bdd6d9fec7c1cb6bdea546d73c21f5a068edc602ff3aa8 +size 198460 diff --git a/tests/Images/Input/Tiff/rgb_packbits_multistrip.tiff b/tests/Images/Input/Tiff/rgb_packbits_multistrip.tiff new file mode 100644 index 000000000..fa9a8f2ae --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_packbits_multistrip.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79ea79362ddad668b28cb919c91dc793b4246f33e411e3794cbe587c5461367a +size 198402 diff --git a/tests/Images/Input/Tiff/rgb_uncompressed.tiff b/tests/Images/Input/Tiff/rgb_uncompressed.tiff new file mode 100644 index 000000000..c9602763d --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_uncompressed.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87134a685bcd816d77cae664b415f1b6a25b78933953c128a742fba653eca9fa +size 196924 diff --git a/tests/Images/Input/Tiff/rgb_uncompressed_tiled.tiff b/tests/Images/Input/Tiff/rgb_uncompressed_tiled.tiff new file mode 100644 index 000000000..0f4912136 --- /dev/null +++ b/tests/Images/Input/Tiff/rgb_uncompressed_tiled.tiff @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:165d85d8e3be6b44309855474c73ae6c14267393945d287fc20be4fcadc0e3f3 +size 3337