公共类BricksTextureCommand:RasterCommand
公共类BricksTextureCommand继承了RasterCommand
公共ref类BricksTextureCommand:公共RasterCommand
作为一个例子,假设你从一个灰色图像开始,如下图所示:
现在假设您调用BricksTextureCommand命令。以下设置适用于以下所有图形:
| 参数 | 价值 |
| OffsetX | 0 |
| OffsetY | 0 |
| RowDifference | 35 |
| BricksWidth | 60 |
| BricksHeight | 20. |
如果您要使用以下附加设置:
| 参数 | 价值 |
| MortarRoughness | 0 |
| MortarRoughnessEvenness | 0 |
| BricksRoughness | 0 |
| BricksRoughnessEvenness | 0 |
| 旗帜 | BricksTextureCommandFlags。SmoothedOutEdges |
结果如下图:
注意砂浆和砖的表面是多么光滑。在下图中,与之前的设置相比,唯一的变化是BricksRoughness的值,它被设置为196:
在下图中,BricksRoughness仍然设置为196,此外,BricksRoughnessEvenness设置为4:
下面两个图显示了BricksTextureCommandFlags之间的差异。smooththedoutedges标志和BricksTextureCommandFlags。SmoothedInEdges国旗。对于这些图形,使用以下设置:
| 参数 | 价值 |
| MortarRoughness | 0 |
| MortarRoughnessEvenness | 0 |
| BricksRoughness | 250 |
| BricksRoughnessEvenness | 0 |
| EdgeWidth | 7 |
| MortarWidth | 4 |
在下面的图中,BricksTextureCommandFlags。设置smooththedoutedges标志:
在下面的图中,BricksTextureCommandFlags。设置了smooththedinedges标志:
该命令支持12位和16位灰度图像,48位和64位彩色图像。支持12位和16位灰度以及48位和64位彩色图像仅在文档/医疗工具包。
有关更多信息,请参阅应用艺术效果.
运行BricksTextureCommand在空白的灰色图像上。
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing;使用Leadtools.ImageProcessing.SpecialEffects;公共无效BricksCommandExample (){//加载图像RasterCodecs codecs =新RasterCodecs ();编解码器。ThrowExceptionsOnInvalidImages =真正的;RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“ImageProcessingDemo \ \ Image3.cmp”));//准备命令FillCommand cmd =新FillCommand (新RasterColor(128, 128, 128));cmd.Run(图片);BricksTextureCommand命令=新BricksTextureCommand ();命令。brickwidth = 60;命令。BricksHeight = 20;命令。OffsetX=0;命令。OffsetY=0;命令。EdgeWidth = 3;命令。MortarWidth = 4;命令。ShadeAngle = 315;命令。RowDifference = 33;命令。MortarRoughness = 20;命令。MortarRoughnessEvenness = 0;命令。砖硬度= 10;命令。砖的硬度= 0;命令。MortarColor =新RasterColor(0,0,0);命令。旗帜=BricksTextureCommandFlags。SmoothedOutEdges|BricksTextureCommandFlags。TransparentMortar;//在图像上应用砖块纹理。command.Run(图片);编解码器。保存(形象,Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24);}静态类LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools。编解码器进口Leadtools。ImageProcessing进口Leadtools.ImageProcessing.SpecialEffects公共子BricksCommandExample ()昏暗的编解码器作为新RasterCodecs ()编解码器。ThrowExceptionsOnInvalidImages =真正的昏暗的leadImage作为RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“ImageProcessingDemo \ \ Image3.cmp”))准备命令昏暗的cmd作为新FillCommand (新RasterColor(128, 128, 128))cmd.Run (leadImage)昏暗的命令作为BricksTextureCommand =新BricksTextureCommand命令。brickwidth = 60命令。BricksHeight = 20命令。OffsetX=0命令。OffsetY=0命令。EdgeWidth = 3命令。MortarWidth = 4命令。ShadeAngle = 315命令。RowDifference = 33命令。MortarRoughness = 20命令。MortarRoughnessEvenness = 0命令。砖的硬度= 10命令。砖的硬度为0命令。MortarColor =新RasterColor(0,0,0)命令。旗帜=BricksTextureCommandFlags。SmoothedOutEdges或BricksTextureCommandFlags。TransparentMortar在图像上应用砖块纹理。command.Run (leadImage)编解码器。保存(leadImage Path.Combine (LEAD_VARS.ImagesDir“Result.jpg”), RasterImageFormat.Jpeg, 24)结束子公共NotInheritable类LEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束类
Leadtools.ImageProcessing.SpecialEffects名称空间
Leadtools.ImageProcessing.Effects.EmbossCommand
Leadtools.ImageProcessing.Color.ChangeHueSaturationIntensityCommand
Leadtools.ImageProcessing.Color.ColorReplaceCommand
Leadtools.ImageProcessing.Color.ColorThresholdCommand
Leadtools.ImageProcessing.Core.DiscreteFourierTransformCommand
Leadtools.ImageProcessing.Effects.DirectionEdgeStatisticalCommand
Leadtools.ImageProcessing.Core.FastFourierTransformCommand
Leadtools.ImageProcessing.Core.FrequencyFilterCommand
Leadtools.ImageProcessing.Core.FrequencyFilterMaskCommand
Leadtools.ImageProcessing.Core.FourierTransformDisplayCommand
Leadtools.ImageProcessing.Effects.StatisticsInformationCommand
Leadtools.ImageProcessing.Effects.FeretsDiameterCommand
Leadtools.ImageProcessing.Effects.ObjectInformationCommand
Leadtools.ImageProcessing.Effects.RegionContourPointsCommand
Leadtools.ImageProcessing.Color.MathematicalFunctionCommand
Leadtools.ImageProcessing.Color.SegmentCommand
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网络查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已发送给技术支持!应该有人联系!如果你的事情很紧急,请回来聊天。
聊天时间:
周一至周五,美国东部时间上午8:30至下午6:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。
