Skip to content

Commit

Permalink
Added unit test for issue #1663.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jul 4, 2024
1 parent 2af61ca commit 5e0c77b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Magick.NET.Tests/Coders/TheEpsCoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ public void ShouldReadTwoImages()
Assert.Equal(MagickFormat.Tiff, images[1].Format);
}

[Fact]
public void ShouldReadMonoChromeImageWhenUseMonochromeIsTrue()
{
if (!Ghostscript.IsAvailable)
return;

var settings = new MagickReadSettings
{
UseMonochrome = true,
};

using var image = new MagickImage(Files.Coders.SwedenHeartEPS, settings);

Assert.Equal(447, image.Width);
Assert.Equal(420, image.Height);
ColorAssert.Equal(MagickColors.Black, image, 223, 61);
ColorAssert.Equal(MagickColors.Black, image, 263, 255);
ColorAssert.Equal(MagickColors.White, image, 223, 62);
ColorAssert.Equal(MagickColors.White, image, 193, 254);
}

[Fact]
public void ShouldReadClipPathsInTiffPreview()
{
Expand Down

0 comments on commit 5e0c77b

Please sign in to comment.