public void Test_PreserveiCCP_SwapBytes() { PngReadDefines defines = new PngReadDefines() { PreserveiCCP = true, SwapBytes = false, }; using (IMagickImage image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.AreEqual("True", image.Settings.GetDefine(MagickFormat.Png, "preserve-iCCP")); Assert.AreEqual(null, image.Settings.GetDefine(MagickFormat.Png, "swap-bytes")); } defines = new PngReadDefines() { PreserveiCCP = false, SwapBytes = true, }; using (IMagickImage image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.AreEqual(null, image.Settings.GetDefine(MagickFormat.Png, "preserve-iCCP")); Assert.AreEqual("True", image.Settings.GetDefine(MagickFormat.Png, "swap-bytes")); } }
public void ShouldNotSetTheDefineWhenSetToFalse() { var defines = new PngReadDefines { IgnoreCrc = false, }; using (var image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.Null(image.Settings.GetDefine(MagickFormat.Png, "ignore-crc")); } }
public void ShouldSetTheDefineWhenSetToTrue() { var defines = new PngReadDefines { IgnoreCrc = true, }; using (var image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.Equal("true", image.Settings.GetDefine(MagickFormat.Png, "ignore-crc")); } }
public void ShouldNotSetTheDefineWhenSetToFalse() { var defines = new PngReadDefines() { SwapBytes = false, }; using (var image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.AreEqual(null, image.Settings.GetDefine(MagickFormat.Png, "swap-bytes")); } }
public void ShouldNotSetTheDefineWhenSetToFalse() { var defines = new PngReadDefines { PreserveiCCP = false, }; using (var image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.Null(image.Settings.GetDefine(MagickFormat.Png, "preserve-iCCP")); } }
public void ShouldSetTheDefineWhenSetToTrue() { var defines = new PngReadDefines { PreserveiCCP = true, }; using (var image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.Equal("true", image.Settings.GetDefine(MagickFormat.Png, "preserve-iCCP")); } }
public void ShouldSetTheDefineWhenSetToTrue() { var defines = new PngReadDefines() { SwapBytes = true, }; using (IMagickImage image = new MagickImage()) { image.Settings.SetDefines(defines); Assert.AreEqual("True", image.Settings.GetDefine(MagickFormat.Png, "swap-bytes")); } }