public void ShouldNotSetTheAttributesWhenTheyAreNotSpecified()
            {
                using (var image = new MagickImage())
                {
                    var settings = new KmeansSettings();

                    settings.SetImageArtifacts(image);

                    Assert.Empty(image.ArtifactNames);
                }
            }
            public void ShouldNotSetTheAttributesWhenTheyAreNotSpecified()
            {
                using (var image = new MagickImage())
                {
                    var settings = new KmeansSettings();

                    settings.SetImageArtifacts(image);

                    Assert.IsNull(image.GetArtifact("kmeans:seed-colors"));
                }
            }
            public void ShouldSetSeedColors()
            {
                using (var image = new MagickImage())
                {
                    var settings = new KmeansSettings()
                    {
                        SeedColors = "red;blue",
                    };

                    settings.SetImageArtifacts(image);

                    Assert.AreEqual("red;blue", image.GetArtifact("kmeans:seed-colors"));
                }
            }
Beispiel #4
0
            public void ShouldRemoveSeedColors()
            {
                using (var image = new MagickImage())
                {
                    var settings = new KmeansSettings
                    {
                        SeedColors = "red;blue",
                    };

                    settings.SetImageArtifacts(image);
                    settings.RemoveImageArtifacts(image);

                    Assert.Empty(image.ArtifactNames);
                }
            }
Beispiel #5
0
            public void ShouldRemoveSeedColors()
            {
                using (var image = new MagickImage())
                {
                    var settings = new KmeansSettings()
                    {
                        SeedColors = "red;blue",
                    };

                    settings.SetImageArtifacts(image);
                    settings.RemoveImageArtifacts(image);

                    Assert.IsNull(image.GetArtifact("kmeans:seed-colors"));
                }
            }