public class SampleTargetCommand : Leadtools.ImageProcessing.RasterCommand, Leadtools.ImageProcessing.IRasterCommand
'Declaration Public Class SampleTargetCommand Inherits Leadtools.ImageProcessing.RasterCommand Implements Leadtools.ImageProcessing.IRasterCommand
'Usage Dim instance As SampleTargetCommand
public sealed class SampleTargetCommand : Leadtools.ImageProcessing.IRasterCommand
function Leadtools.ImageProcessing.Color.SampleTargetCommand()
public ref class SampleTargetCommand : public Leadtools.ImageProcessing.RasterCommand, Leadtools.ImageProcessing.IRasterCommand
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing.Color Public Sub SampleTargetCommandExample() Dim codecs As New RasterCodecs() codecs.ThrowExceptionsOnInvalidImages = True Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")) ' Prepare the command Dim command As SampleTargetCommand = New SampleTargetCommand command.SampleColor = New RasterColor(50, 100, 150) command.TargetColor = New RasterColor(60, 90, 150) command.Flags = SampleTargetCommandFlags.Red Or SampleTargetCommandFlags.High command.Run(leadImage) codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24) End Sub Public NotInheritable Class LEAD_VARS Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" End Class
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Color; public void SampleTargetCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); // Prepare the command SampleTargetCommand command = new SampleTargetCommand(); command.SampleColor = new RasterColor(50, 100, 150); command.TargetColor = new RasterColor(60, 90, 150); command.Flags = SampleTargetCommandFlags.Red | SampleTargetCommandFlags.High; command.Run(image); codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Color; public async Task SampleTargetCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; // Load the image string srcFileName = @"Assets\Image1.cmp"; StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName); RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile)); // Prepare the command SampleTargetCommand command = new SampleTargetCommand(); command.SampleColor = RasterColorHelper.Create(50, 100, 150); command.TargetColor = RasterColorHelper.Create(60, 90, 150); command.Flags = SampleTargetCommandFlags.Red | SampleTargetCommandFlags.High; command.Run(image); string destFileName = @"result.jpg"; StorageFile saveFile = await Tools.AppLocalFolder.CreateFileAsync(destFileName); await codecs.SaveAsync(image, LeadStreamFactory.Create(saveFile), RasterImageFormat.Jpeg, 0); }
SampleTargetCommand Members
Leadtools.ImageProcessing.Color Namespace
Introduction to Image Processing With LEADTOOLS
Correcting Colors
Leadtools.ImageProcessing.Effects.AddNoiseCommand
Leadtools.ImageProcessing.Effects.EmbossCommand
Leadtools.ImageProcessing.Effects.MosaicCommand
Leadtools.ImageProcessing.Effects.MotionBlurCommand
Leadtools.ImageProcessing.Effects.OilifyCommand
PosterizeCommand Class
RemoveRedEyeCommand Class
SolarizeCommand Class
Leadtools.ImageProcessing.SpecialEffects.BumpMapCommand
Leadtools.ImageProcessing.Effects.CubismCommand
Leadtools.ImageProcessing.SpecialEffects.DrawStarCommand
Leadtools.ImageProcessing.SpecialEffects.GlowCommand
Leadtools.ImageProcessing.SpecialEffects.FreePlaneBendCommand
Leadtools.ImageProcessing.SpecialEffects.DryCommand
Leadtools.ImageProcessing.SpecialEffects.OceanCommand
Leadtools.ImageProcessing.SpecialEffects.GlassEffectCommand
Leadtools.ImageProcessing.SpecialEffects.LensFlareCommand
Leadtools.ImageProcessing.SpecialEffects.LightCommand
Leadtools.ImageProcessing.SpecialEffects.FreeRadialBendCommand
Leadtools.ImageProcessing.SpecialEffects.PlaneBendCommand
Leadtools.ImageProcessing.SpecialEffects.PlaneCommand
Leadtools.ImageProcessing.SpecialEffects.TunnelCommand
Leadtools.ImageProcessing.SpecialEffects.BendCommand
Leadtools.ImageProcessing.SpecialEffects.CylinderCommand
Leadtools.ImageProcessing.SpecialEffects.FreeHandShearCommand
Leadtools.ImageProcessing.SpecialEffects.FreeHandWaveCommand
Leadtools.ImageProcessing.SpecialEffects.ImpressionistCommand
Leadtools.ImageProcessing.SpecialEffects.PixelateCommand
Leadtools.ImageProcessing.SpecialEffects.PolarCommand
Leadtools.ImageProcessing.SpecialEffects.PunchCommand
Leadtools.ImageProcessing.SpecialEffects.RadialBlurCommand
Leadtools.ImageProcessing.SpecialEffects.RadialWaveCommand
Leadtools.ImageProcessing.SpecialEffects.RippleCommand
Leadtools.ImageProcessing.SpecialEffects.SphereCommand
Leadtools.ImageProcessing.SpecialEffects.SwirlCommand
Leadtools.ImageProcessing.SpecialEffects.WaveCommand
Leadtools.ImageProcessing.SpecialEffects.WindCommand
Leadtools.ImageProcessing.SpecialEffects.ZoomBlurCommand
Leadtools.ImageProcessing.SpecialEffects.ZoomWaveCommand
AdjustTintCommand Class
Leadtools.ImageProcessing.Effects.ColorHalftoneCommand