public static void RemoveImageArtifacts(this ICompareSettings <QuantumType> self, IMagickImage <QuantumType> image)
        {
            if (self.HighlightColor != null)
            {
                image.RemoveArtifact("compare:highlight-color");
            }

            if (self.LowlightColor != null)
            {
                image.RemoveArtifact("compare:lowlight-color");
            }

            if (self.MasklightColor != null)
            {
                image.RemoveArtifact("compare:masklight-color");
            }
        }
Ejemplo n.º 2
0
        public static void SetImageArtifacts(IMagickImage <QuantumType> image, ICompareSettings <QuantumType> settings)
        {
            if (settings.HighlightColor != null)
            {
                image.SetArtifact("compare:highlight-color", settings.HighlightColor.ToString());
            }

            if (settings.LowlightColor != null)
            {
                image.SetArtifact("compare:lowlight-color", settings.LowlightColor.ToString());
            }

            if (settings.MasklightColor != null)
            {
                image.SetArtifact("compare:masklight-color", settings.MasklightColor.ToString());
            }
        }