internal void SetImageArtifacts(IMagickImage image) { if (AreaThreshold != null) { image.SetArtifact("connected-components:area-threshold", AreaThreshold.Value.ToString(CultureInfo.InvariantCulture)); } if (MeanColor) { image.SetArtifact("connected-components:mean-color", "true"); } }
public static void SetImageArtifacts(this IMorphologySettings self, IMagickImage <QuantumType> image) { if (self.ConvolveBias != null) { image.SetArtifact("convolve:bias", self.ConvolveBias.ToString()); } if (self.ConvolveScale != null) { image.SetArtifact("convolve:scale", self.ConvolveScale.ToString()); } }
public static void SetImageArtifacts(this IDistortSettings self, IMagickImage <QuantumType> image) { if (self.Scale != null) { image.SetArtifact("distort:scale", self.Scale.Value.ToString(CultureInfo.InvariantCulture)); } if (self.Viewport != null) { image.SetArtifact("distort:viewport", self.Viewport.ToString()); } }
internal void SetImageArtifacts(IMagickImage image) { if (Scale != null) { image.SetArtifact("distort:scale", Scale.Value.ToString(CultureInfo.InvariantCulture)); } if (Viewport != null) { image.SetArtifact("distort:viewport", Viewport.ToString()); } }
internal void SetImageArtifacts(IMagickImage image) { if (ConvolveBias != null) { image.SetArtifact("convolve:bias", ConvolveBias.ToString()); } if (ConvolveScale != null) { image.SetArtifact("convolve:scale", ConvolveScale.ToString()); } }
internal static void SetImageArtifacts(this IConnectedComponentsSettings self, IMagickImage <QuantumType> image) { if (self.AreaThreshold != null) { image.SetArtifact("connected-components:area-threshold", self.AreaThreshold.Value.ToString(CultureInfo.InvariantCulture)); } if (self.MeanColor) { image.SetArtifact("connected-components:mean-color", "true"); } }
public static void SetImageArtifacts(this IKmeansSettings self, IMagickImage <QuantumType> image) { if (!string.IsNullOrEmpty(self.SeedColors)) { image.SetArtifact("kmeans:seed-colors", self.SeedColors); } }
internal void SetImageArtifacts(IMagickImage image) { if (MeanColor) { image.SetArtifact("connected-components:mean-color", "true"); } }
internal void SetImageArtifacts(IMagickImage image) { if (SignalToNoiseRatio != null) { image.SetArtifact("complex:snr", SignalToNoiseRatio.Value.ToString(CultureInfo.InvariantCulture)); } }
public static void SetImageArtifacts(IMagickImage <QuantumType> image, IKmeansSettings settings) { if (settings.SeedColors != null && settings.SeedColors.Length > 0) { image.SetArtifact("kmeans:seed-colors", settings.SeedColors); } }
internal void SetImageArtifacts(IMagickImage image) { if (AutoCrop) { image.SetArtifact("deskew:auto-crop", "true"); } }
private void Distort(IMagickImage output, PointD[] corners, MagickGeometry inputDimensions, MagickGeometry trimmedDimensions, MagickColor backgroundColor) { MagickGeometry outputDimensions = GetDimensions(output, corners, inputDimensions, trimmedDimensions); double[] arguments = new double[16] { corners[0].X, corners[0].Y, 0, 0, corners[1].X, corners[1].Y, 0, outputDimensions.Height, corners[2].X, corners[2].Y, outputDimensions.Width, outputDimensions.Height, corners[3].X, corners[3].Y, outputDimensions.Width, 0 }; output.VirtualPixelMethod = VirtualPixelMethod.Background; output.BackgroundColor = backgroundColor; if (!DisableViewportCrop) { output.SetArtifact("distort:viewport", GetViewport(arguments, corners).ToString()); } var distortSettings = new DistortSettings() { Bestfit = true }; output.Distort(DistortMethod.Perspective, distortSettings, arguments); output.BorderColor = backgroundColor; output.Border(2); output.ColorFuzz = ColorFuzz; output.Trim(); output.RePage(); }
public static void SetImageArtifacts(this IComplexSettings self, IMagickImage <QuantumType> image) { if (self.SignalToNoiseRatio != null) { image.SetArtifact("complex:snr", self.SignalToNoiseRatio.Value.ToString(CultureInfo.InvariantCulture)); } }
internal void SetImageArtifacts(IMagickImage image) { if (!string.IsNullOrEmpty(SeedColors)) { image.SetArtifact("kmeans:seed-colors", SeedColors); } }
public static void SetImageArtifacts(this IDeskewSettings self, IMagickImage <QuantumType> image) { if (self.AutoCrop) { image.SetArtifact("deskew:auto-crop", self.AutoCrop); } }
public static void SetImageArtifacts(this ICompareSettings <QuantumType> self, IMagickImage <QuantumType> image) { if (self.HighlightColor != null) { image.SetArtifact("compare:highlight-color", self.HighlightColor.ToString()); } if (self.LowlightColor != null) { image.SetArtifact("compare:lowlight-color", self.LowlightColor.ToString()); } if (self.MasklightColor != null) { image.SetArtifact("compare:masklight-color", self.MasklightColor.ToString()); } }
private void SetDistortViewport(IMagickImage image, int x, int y) { image.VirtualPixelMethod = VirtualPixelMethod.White; var viewport = string.Format(CultureInfo.InvariantCulture, "{0}x{1}+{2}+{3}", (int)_width, (int)_height, x, y); image.SetArtifact("distort:viewport", viewport); }
internal void SetImageArtifacts(IMagickImage image) { if (HighlightColor != null) { image.SetArtifact("compare:highlight-color", HighlightColor.ToString()); } if (LowlightColor != null) { image.SetArtifact("compare:lowlight-color", LowlightColor.ToString()); } if (MasklightColor != null) { image.SetArtifact("compare:masklight-color", MasklightColor.ToString()); } }
internal static void SetImageArtifacts(this IConnectedComponentsSettings self, IMagickImage <QuantumType> image) { if (self.AngleThreshold != null) { image.SetArtifact("connected-components:angle-threshold", self.AngleThreshold.Value.ToString()); } if (self.AreaThreshold != null) { image.SetArtifact("connected-components:area-threshold", self.AreaThreshold.Value.ToString()); } if (self.CircularityThreshold != null) { image.SetArtifact("connected-components:circularity-threshold", self.CircularityThreshold.Value.ToString()); } if (self.DiameterThreshold != null) { image.SetArtifact("connected-components:diameter-threshold", self.DiameterThreshold.Value.ToString()); } if (self.EccentricityThreshold != null) { image.SetArtifact("connected-components:eccentricity-threshold", self.EccentricityThreshold.Value.ToString()); } if (self.MajorAxisThreshold != null) { image.SetArtifact("connected-components:major-axis-threshold", self.MajorAxisThreshold.Value.ToString()); } if (self.MeanColor) { image.SetArtifact("connected-components:mean-color", "true"); } if (self.MinorAxisThreshold != null) { image.SetArtifact("connected-components:minor-axis-threshold", self.MinorAxisThreshold.Value.ToString()); } if (self.PerimeterThreshold != null) { image.SetArtifact("connected-components:perimeter-threshold", self.PerimeterThreshold.Value.ToString()); } }