diff --git a/tests/Magick.NET.Tests/Coders/ThePdfCoder.cs b/tests/Magick.NET.Tests/Coders/ThePdfCoder.cs index 7aceb3d2f9..72e7f38451 100644 --- a/tests/Magick.NET.Tests/Coders/ThePdfCoder.cs +++ b/tests/Magick.NET.Tests/Coders/ThePdfCoder.cs @@ -1,6 +1,7 @@ // Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. // Licensed under the Apache License, Version 2.0. +using System.IO; using System.Threading.Tasks; using ImageMagick; using Xunit; @@ -37,5 +38,26 @@ public void ShouldReadFileMultithreadedCorrectly() results[i].Wait(); } } + + [Fact] + public void ShouldWriteTiffImageInCorrectColor() + { + if (!Ghostscript.IsAvailable) + return; + + using (var input = new MagickImage(Files.Coders.PixelTIF)) + { + using (var memorystream = new MemoryStream()) + { + input.Write(memorystream, MagickFormat.Tiff); + memorystream.Position = 0; + + using (var output = new MagickImage(memorystream)) + { + ColorAssert.Equal(MagickColors.White, output, 0, 0); + } + } + } + } } } diff --git a/tests/Magick.NET.Tests/Images/Coders/Pixel.tif b/tests/Magick.NET.Tests/Images/Coders/Pixel.tif new file mode 100644 index 0000000000..edadf29d76 Binary files /dev/null and b/tests/Magick.NET.Tests/Images/Coders/Pixel.tif differ diff --git a/tests/Shared/Files.cs b/tests/Shared/Files.cs index 83d2860187..db70c9484b 100644 --- a/tests/Shared/Files.cs +++ b/tests/Shared/Files.cs @@ -151,6 +151,9 @@ public static string PageTIF public static string PdfExamplePasswordOriginalPDF => Root + @"Images/Coders/pdf-example-password.original.pdf"; + public static string PixelTIF + => Root + @"Images/Coders/Pixel.tif"; + public static string PlayerPSD => Root + @"Images/Coders/Player.psd";