公共RasterImageImageRegion {得到;}
公共只读的财产ImageRegion作为RasterImage
@ property(原子,强壮,只读的,可以为空)LTRasterImage * imageRegion
公共RasterImage getImageRegion ()
公共:
财产RasterImage ^ImageRegion {
RasterImage ^get ();
}
浅拷贝的形象,也有一个区域包含反向文本删除。
如果InvertedTextCommandFlags.SingleRegion|InvertedTextCommandFlags.LeadRegion已经设置标志的属性,那么什么时候InvertedTextCommand回报,这个属性更新的浅拷贝图片也有一个区域包含反向文本删除。所以设置InvertedTextCommandFlags.SingleRegion|InvertedTextCommandFlags.LeadRegion旗帜。处置时不再需要。
运行InvertedTextCommand在一个图像。
使用Leadtools;
使用Leadtools.Codecs;
使用Leadtools.ImageProcessing.Core;
公共无效ImageRegionPropertyExample ()
{
/ /加载一个图像
RasterCodecs编解码器=新RasterCodecs ();
编解码器。ThrowExceptionsOnInvalidImages =真正的;
RasterImage图像= codecs.Load (Path.Combine (LEAD_VARS.ImagesDir,“Clean.tif”));
/ /准备命令
InvertedTextCommand命令=新InvertedTextCommand ();
命令。InvertedText + =新EventHandler < InvertedTextCommandEventArgs > (InvertedTextEvent_S3);
命令。旗帜= InvertedTextCommandFlags.UseDpi|InvertedTextCommandFlags.SingleRegion|InvertedTextCommandFlags.LeadRegion;
命令。MaximumBlackPercent = 95;
命令。MinimumBlackPercent = 70;
命令。MinimumInvertHeight = 500;
命令。MinimumInvertWidth = 5000;
command.Run(图片);
}
私人无效InvertedTextEvent_S3 (对象发送方,InvertedTextCommandEventArgs e)
{
MessageBox.Show (“大小”+”(“+ e.BoundingRectangle。左+”、“+ e.BoundingRectangle。前+“)”+”(“+ e.BoundingRectangle。正确的+”、“+ e.BoundingRectangle。底+“)”+
“\ n黑数”+ + e.BlackCount.ToString ()
“\ n白”+ e.WhiteCount.ToString ());
e。状态= RemoveStatus.Remove;
}
静态类LEAD_VARS
{
公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;
}
进口Leadtools
进口Leadtools.Codecs
进口Leadtools.ImageProcessing.Core
公共感到失望invertedTextCommand_S3作为InvertedTextCommand
公共子ImageRegionPropertyExample ()
昏暗的编解码器作为新RasterCodecs ()
编解码器。ThrowExceptionsOnInvalidImages =真正的
昏暗的leadImage作为RasterImage = codecs.Load (Path.Combine (LEAD_VARS.ImagesDir“Clean.tif”))
“准备的命令
invertedTextCommand_S3 =新InvertedTextCommand
invertedTextCommand_S3。旗帜= InvertedTextCommandFlags.UseDpi或InvertedTextCommandFlags.LeadRegion或InvertedTextCommandFlags.SingleRegion
invertedTextCommand_S3。MaximumBlackPercent = 95
invertedTextCommand_S3。MinimumBlackPercent = 70
invertedTextCommand_S3。MinimumInvertHeight = 500
invertedTextCommand_S3。MinimumInvertWidth = 5000
invertedTextCommand_S3.Run (leadImage)
结束子
私人子InvertedTextCommand_InvertedText_S3 (按值传递发送方作为对象,按值传递e作为InvertedTextCommandEventArgs)处理invertedTextCommand_S3.InvertedText
MessageBox.Show (“大小”+”(“+ + e.BoundingRectangle.Left.ToString ()”、“+ + e.BoundingRectangle.Top.ToString ()“)”+”(“+ + e.BoundingRectangle.Right.ToString ()”、“+ + e.BoundingRectangle.Bottom.ToString ()“)”+
杆(13)+“黑”+ + e.BlackCount.ToString ()
杆(13)+“白色”+ e.WhiteCount.ToString ())
e。状态= RemoveStatus.Remove
结束子
公共NotInheritable类LEAD_VARS
公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”
结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。