←选择平台

SampleTargetCommand类

总结
通过将样本颜色移到目标颜色来纠正颜色值。该命令在影像专业和上面的工具包。
语法
c#
VB
c++
公共SampleTargetCommand:RasterCommand
公共SampleTargetCommand继承了RasterCommand
公共ref类SampleTargetCommand:公共RasterCommand
讲话
  • 例如,假设您正在处理彩色图像。属性中的SampleColor属性或SampleColor参数中,设置RasterColor结构到125,绿色部分到165,蓝色部分到100。在TargetColor属性或TargetColor参数中,您将红色值部分设置为170,绿色值部分设置为120,蓝色值部分设置为200。如果你设置SampleTargetCommandFlags. blue在Flags属性或Flags参数中,那么对于图像中每个蓝色值为100的像素,该蓝色值将被更改为200,从而改变图像中的颜色。取决于你是否设置SampleTargetCommandFlags.Low,SampleTargetCommandFlags.Mid或SampleTargetCommandFlags. high,要么蓝色通道中的阴影值将被重新映射,要么蓝色通道中的中音值将被重新映射,要么蓝色通道中的高亮值将被重新映射。
  • 该命令支持12位和16位灰度,48位和64位彩色图像。
  • 对于灰度图像,使用SampleColor和TargetColor属性的灰度值或SampleColor和TargetColor参数,并且不同的通道标志具有相同的效果,因为它工作在同一通道(灰色通道)上。对12位和16位灰度以及48位和64位彩色图像的支持仅在文档/医疗工具包。
  • 该命令不支持签名数据映像。
  • 此命令不支持32位灰度图像。

有关更多信息,请参阅介绍用LEADTOOLS进行图像处理.有关更多信息,请参阅修正颜色

例子

运行SampleTargetCommand在图像上。

c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing.Color;公共无效SampleTargetCommandExample (){//加载图像RasterCodecs codecs =RasterCodecs ();编解码器。ThrowExceptionsOnInvalidImages =真正的RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“sample5.cmp”));//准备命令SampleTargetCommand命令=SampleTargetCommand ();命令。SampleColor =RasterColor(50,100,150);命令。TargetColor =RasterColor(60,90,150);命令。Flags = SampleTargetCommandFlags。红色的|SampleTargetCommandFlags。高;command.Run(图片);编解码器。保存(形象,Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24);}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”}
进口Leadtools进口Leadtools。编解码器进口Leadtools.ImageProcessing.Color公共SampleTargetCommandExample ()昏暗的编解码器作为RasterCodecs ()编解码器。ThrowExceptionsOnInvalidImages =真正的昏暗的leadImage作为RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“sample5.cmp”))准备命令昏暗的命令作为SampleTargetCommand =SampleTargetCommand命令。SampleColor =RasterColor(50,100,150)命令。TargetColor =光栅颜色(60,90,150)命令。Flags = SampleTargetCommandFlags。红色的SampleTargetCommandFlags。高command.Run (leadImage)编解码器。保存(leadImage Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24)结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

另请参阅

参考

SampleTargetCommand成员

Leadtools.ImageProcessing.Color名称空间

介绍用LEADTOOLS进行图像处理

修正颜色

Leadtools.ImageProcessing.Effects.AddNoiseCommand

Leadtools.ImageProcessing.Effects.EmbossCommand

Leadtools.ImageProcessing.Effects.MosaicCommand

Leadtools.ImageProcessing.Effects.MotionBlurCommand

Leadtools.ImageProcessing.Effects.OilifyCommand

PosterizeCommand类

RemoveRedEyeCommand类

SolarizeCommand类

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类

Leadtools.ImageProcessing.Effects.ColorHalftoneCommand

Leadtools.ImageProcessing.Color组装
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2021领德科技有限公司版权所有。