Skip to content

Commit

Permalink
Implemented test for BlackPointCompensation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Jun 26, 2016
1 parent 1fd2f30 commit afc10df
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions Magick.NET.Tests/Core/MagickImageTests.cs
Expand Up @@ -479,12 +479,31 @@ public void Test_AutoOrient()
[TestMethod, TestCategory(_Category)]
public void Test_BlackPointCompensation()
{
using (MagickImage image = new MagickImage())
using (MagickImage image = new MagickImage(Files.FujiFilmFinePixS1ProPNG))
{
Assert.AreEqual(false, image.BlackPointCompensation);
image.RenderingIntent = RenderingIntent.Relative;

image.TransformColorSpace(ColorProfile.SRGB, ColorProfile.USWebCoatedSWOP);
#if Q8
ColorAssert.AreEqual(new MagickColor("#d98c32"), image, 130, 100);
#elif Q16 || Q16HDRI
ColorAssert.AreEqual(new MagickColor("#da478d06323d"), image, 130, 100);
#endif

image.Read(Files.FujiFilmFinePixS1ProPNG);

Assert.AreEqual(false, image.BlackPointCompensation);
image.RenderingIntent = RenderingIntent.Relative;
image.BlackPointCompensation = true;
Assert.AreEqual(true, image.BlackPointCompensation);
Assert.Inconclusive("Needs implementation.");

image.TransformColorSpace(ColorProfile.SRGB, ColorProfile.USWebCoatedSWOP);

#if Q8
ColorAssert.AreEqual(new MagickColor("#cc8432"), image, 130, 100);
#elif Q16 || Q16HDRI
ColorAssert.AreEqual(new MagickColor("#cd0a844e3209"), image, 130, 100);
#endif
}
}

Expand Down

0 comments on commit afc10df

Please sign in to comment.