←选择平台

ColorIntensityBalanceCommand类

总结
改变红色、绿色或蓝色通道的分布。该命令在影像专业和上面的工具包。
语法
c#
VB
objective - c
c++
Java
公共ColorIntensityBalanceCommand:RasterCommand
公共ColorIntensityBalanceCommand继承了RasterCommand
@接口LTColorIntensityBalanceCommand: LTRasterCommand
公共ColorIntensityBalanceCommand扩展RasterCommand
公共ref类ColorIntensityBalanceCommand:公共RasterCommand
讲话
  • 此命令更改红色、绿色或蓝色通道的分布,以使图像中的颜色更准确或更不同。
  • 每个颜色组件都是独立处理的。每个组件的颜色范围根据强度分为阴影、中间色调和高光。属性对每个范围中的值进行不同的调整ColorIntensityBalanceCommandData类。a中的正值ColorIntensityBalanceCommandData类将使该特定组件变亮,而负值将使该组件变暗。值为0时,组件保持不变。
  • 保留亮度选项旨在最小化图像中的亮度变化。
  • 该命令只支持RGB镜像。它不支持灰度图像。
  • 该命令支持48位和64位彩色图像。对48和64位彩色图像的支持仅在文档/医疗工具包。
  • 该命令不支持签名数据映像。
  • 此命令不支持32位灰度图像。

有关更多信息,请参阅改变亮度和对比度。有关更多信息,请参阅修正颜色

例子

运行ColorIntensityBalanceCommand在图像上,通过增加红色通道值来平衡颜色。

c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing.Color;公共无效ColorIntensityBalanceCommandExample (){//加载图像RasterCodecs codecs =RasterCodecs ();编解码器。ThrowExceptionsOnInvalidImages =真正的RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“sample5.cmp”));//准备命令ColorIntensityBalanceCommand命令=ColorIntensityBalanceCommand ();ColorIntensityBalanceCommandData阴影=ColorIntensityBalanceCommandData ();ColorIntensityBalanceCommandData MidTone =ColorIntensityBalanceCommandData ();ColorIntensityBalanceCommandData HighLight =ColorIntensityBalanceCommandData ();阴影。红色= 60;阴影。蓝色= 0;阴影。绿色= 0;MidTone。红色= 40;MidTone。蓝色= 0;MidTone。绿色= 0;的亮点。红色= 70;的亮点。蓝色= 0;的亮点。绿色= 0;命令。阴影=阴影s;命令。MidTone=MidTone;命令。突出;命令。亮度=//通过增加红色通道值来平衡颜色。command.Run(图片);编解码器。保存(形象,Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24);}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”}
进口Leadtools进口Leadtools。编解码器进口Leadtools.ImageProcessing.Color公共ColorIntensityBalanceCommandExample ()昏暗的编解码器作为RasterCodecs ()编解码器。ThrowExceptionsOnInvalidImages =真正的昏暗的leadImage作为RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“sample5.cmp”))准备命令昏暗的命令作为ColorIntensityBalanceCommand =ColorIntensityBalanceCommand昏暗的影子作为ColorIntensityBalanceCommandData =ColorIntensityBalanceCommandData昏暗的MidTone作为ColorIntensityBalanceCommandData =ColorIntensityBalanceCommandData昏暗的突出作为ColorIntensityBalanceCommandData =ColorIntensityBalanceCommandData的影子。红色= 60的影子。蓝色= 0的影子。绿色= 0MidTone。红色= 40MidTone。蓝色= 0MidTone。绿色= 0的亮点。红色= 70的亮点。蓝色= 0的亮点。绿色= 0命令。阴影=阴影命令。MidTone=MidTone命令。高光命令。亮度=“通过增加红色通道值来平衡颜色。command.Run (leadImage)编解码器。保存(leadImage Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24)结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

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