LEADTOOLS画像処理(Leadtools.ImageProcessing.Coreアセンブリ)

フレームを表示

HalfTonePatternCommandクラス








メンバ 
トーンの連続範囲を保ちながら画像のハーフトーン画面エフェクトを作成します。このメソッドはDocument/Medicalツールキットで利用できます。
オブジェクトモデル
構文
'Declaration
 
Public Class HalfTonePatternCommand 
   Inherits Leadtools.ImageProcessing.RasterCommand
   Implements Leadtools.ImageProcessing.IRasterCommand 
'Usage
 
Dim instance As HalfTonePatternCommand
public sealed class HalfTonePatternCommand : Leadtools.ImageProcessing.IRasterCommand  
function Leadtools.ImageProcessing.Core.HalfTonePatternCommand()
public ref class HalfTonePatternCommand : public Leadtools.ImageProcessing.RasterCommand, Leadtools.ImageProcessing.IRasterCommand  
解説
サンプル

imageの上でHalfTonePatternCommandを実行します。

Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Core

   
Public Sub HalfTonePatternCommandExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True
   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp"))

   ' Prepare the command
   Dim command As New HalfTonePatternCommand
   command.Contrast = 100
   command.Ripple = 200
   command.AngleContrast = 12
   command.AngleRipple = 2
   command.AngleOffset = 4500
   command.BackGroundColor = New RasterColor(255, 255, 255)
   command.ForeGroundColor = New RasterColor(255, 0, 0)
   command.Type = HalfTonePatternCommandType.Line
   command.Run(leadImage)

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.Core;

      
public void HalfTonePatternCommandExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp"));

   // Prepare the command
   HalfTonePatternCommand command  = new HalfTonePatternCommand();
   command.Contrast = 100;
   command.Ripple = 200;
   command.AngleContrast = 12;
   command.AngleRipple = 2;
   command.AngleOffset = 4500;
   command.BackGroundColor = new RasterColor(255, 255, 255);
   command.ForeGroundColor = new RasterColor(255, 0,0);
   command.Type = HalfTonePatternCommandType.Line;
   command.Run(image);

}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
function HalfTonePatternCommandExample()
{
   var codecs = new Leadtools.Codecs.RasterCodecs();
   codecs.throwExceptionsOnInvalidImages = true;

   // Load the image
   var srcFileName = "Assets\\Image1.cmp";
   return Tools.AppInstallFolder().getFileAsync(srcFileName).then(function (loadFile) {
      return codecs.loadAsync(Leadtools.LeadStreamFactory.create(loadFile));
   }).then(function (image) {
      // Prepare the command
      with (Leadtools.ImageProcessing.Core) {
         var command  = new HalfTonePatternCommand();
         command.contrast = 100;
         command.ripple = 200;
         command.angleContrast = 12;
         command.angleRipple = 2;
         command.angleOffset = 4500;
         command.backGroundColor = Leadtools.RasterColorHelper.create(255, 255, 255);
         command.foreGroundColor = Leadtools.RasterColorHelper.create(255, 0,0);
         command.type = HalfTonePatternCommandType.line;
         command.run(image);
      }
   });
}
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;

      
public async Task HalfTonePatternCommandExample()
{
   // 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
   HalfTonePatternCommand command  = new HalfTonePatternCommand();
   command.Contrast = 100;
   command.Ripple = 200;
   command.AngleContrast = 12;
   command.AngleRipple = 2;
   command.AngleOffset = 4500;
   command.BackGroundColor = RasterColorHelper.Create(255, 255, 255);
   command.ForeGroundColor = RasterColorHelper.Create(255, 0,0);
   command.Type = HalfTonePatternCommandType.Line;
   command.Run(image);

}
必要条件

ターゲットプラットホーム

参照

参照

HalfTonePatternCommandメンバ
Leadtools.ImageProcessing.Core名前空間
カラーハーフトーンとハーフトーン画像
Leadtools.ImageProcessing.GrayscaleCommand
Leadtools.ImageProcessing.Color.GrayScaleExtendedCommand
Leadtools.ImageProcessing.Color.AutoColorLevelCommand
Leadtools.ImageProcessing.Color.ColorLevelCommand
CorrelationCommandクラス
Leadtools.ImageProcessing.Color.GrayScaleToDuotoneCommand
Leadtools.ImageProcessing.Color.GrayScaleToMultitoneCommand
Leadtools.ImageProcessing.Effects.RegionHolesRemovalCommand
Leadtools.ImageProcessing.Color.SelectiveColorCommand
Leadtools.ImageProcessing.Effects.SkeletonCommand
HalfToneCommandクラス
Leadtools.ImageProcessing.SpecialEffects.PointillistCommand
Leadtools.ImageProcessing.Effects.ColorHalftoneCommand
Leadtools.ImageProcessing.Color.ColorSeparateCommand
Leadtools.ImageProcessing.Color.ColorMergeCommand
Leadtools.ImageProcessing.Color.DesaturateCommand
Leadtools.ImageProcessing.Effects.StatisticsInformationCommand
Leadtools.ImageProcessing.Color.HistogramCommand
Leadtools.ImageProcessing.Color.ColorCountCommand
MinMaxBitsCommandクラス
MinMaxValuesCommandクラス
Leadtools.ImageProcessing.Color.ConvertToColoredGrayCommand
ColorizeGrayCommandクラス
ShiftDataCommandクラス
SelectDataCommandクラス
WindowLevelCommandクラス
WindowLevelCommandクラス
Leadtools.RasterPalette.WindowLevelFillLookupTable(Leadtools.RasterColor[]、Leadtools.RasterColor、Leadtools.RasterColor、System.Int32、System.Int32、System.Int32、System.Int32、System.Int32、System.Int32、System.Int32、Leadtools.RasterPaletteWindowLevelFlags)