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

フレームを表示

CubismCommandクラス








メンバ 
それが立体派の芸術スタイルで作成されたように見えるように、imageを回転する長方形(立方の顔)のコレクションにリマップします。
オブジェクトモデル
構文
'Declaration
 
Public Class CubismCommand 
   Inherits Leadtools.ImageProcessing.RasterCommand
   Implements Leadtools.ImageProcessing.IRasterCommand 
'Usage
 
Dim instance As CubismCommand
public sealed class CubismCommand : Leadtools.ImageProcessing.IRasterCommand  
function Leadtools.ImageProcessing.Effects.CubismCommand()
解説
詳細については、「色の補正」を参照してください。
サンプル

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

Copy Code  
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.ImageProcessing.Effects

   
Public Sub CubismCommandExample()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True
   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\Image2.jpg"))

   ' Prepare the command
   Dim command As CubismCommand = New CubismCommand
   command.Space = 5
   command.Length = 15
   command.Brightness = 200
   command.Angle = 4500
   command.FillColor = New RasterColor(255, 0, 0)
   command.Flags = CubismCommandFlags.Color Or CubismCommandFlags.Rectangle Or CubismCommandFlags.Random
   command.Run(leadImage)
   codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24)

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

      
public void CubismCommandExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Image2.jpg"));

   // Prepare the command
   CubismCommand command = new CubismCommand();
   command.Space = 5;
   command.Length = 15;
   command.Brightness = 200;
   command.Angle = 4500;
   command.FillColor = new RasterColor(255, 0, 0);
   command.Flags = CubismCommandFlags.Color | CubismCommandFlags.Rectangle | CubismCommandFlags.Random;
   command.Run(image);
   codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24);

}

static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Effects;
using Leadtools.ImageProcessing;

      
public async Task CubismCommandExample()
{
   // Load an image
   RasterCodecs codecs = new RasterCodecs();
   codecs.ThrowExceptionsOnInvalidImages = true;
   // Load the image
   string srcFileName = @"Assets\Master.jpg";
   StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName);
   RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile));

   // Prepare the command
   CubismCommand command = new CubismCommand();
   command.Space = 5;
   command.Length = 15;
   command.Brightness = 200;
   command.Angle = 4500;
   command.FillColor = RasterColorHelper.Create(255, 0, 0);
   command.Flags = CubismCommandFlags.Color | CubismCommandFlags.Rectangle | CubismCommandFlags.Random;
   command.Run(image);
   //Save as BMP
   string destFileName = @"result.bmp";
   StorageFile saveFile = await Tools.AppLocalFolder.CreateFileAsync(destFileName);
   await codecs.SaveAsync(image, LeadStreamFactory.Create(saveFile), RasterImageFormat.Bmp, 24);

}
必要条件

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

参照

参照

CubismCommandメンバ
Leadtools.ImageProcessing.Effects名前空間
色の補正
AddNoiseCommandクラス
EmbossCommandクラス
MosaicCommandクラス
MotionBlurCommandクラス
OilifyCommandクラス
Leadtools.ImageProcessing.Color.PosterizeCommand
Leadtools.ImageProcessing.Color.RemoveRedEyeCommand
Leadtools.ImageProcessing.Color.SolarizeCommand
Leadtools.ImageProcessing.SpecialEffects.BumpMapCommand
Leadtools.ImageProcessing.SpecialEffects.DrawStarCommand
Leadtools.ImageProcessing.SpecialEffects.DryCommand
Leadtools.ImageProcessing.SpecialEffects.FreePlaneBendCommand
Leadtools.ImageProcessing.SpecialEffects.FreeRadialBendCommand
Leadtools.ImageProcessing.SpecialEffects.GlassEffectCommand
Leadtools.ImageProcessing.SpecialEffects.GlowCommand
Leadtools.ImageProcessing.SpecialEffects.LensFlareCommand
Leadtools.ImageProcessing.SpecialEffects.LightCommand
Leadtools.ImageProcessing.SpecialEffects.OceanCommand
Leadtools.ImageProcessing.SpecialEffects.PlaneBendCommand
Leadtools.ImageProcessing.SpecialEffects.PlaneCommand
Leadtools.ImageProcessing.Color.SampleTargetCommand
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.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
Leadtools.ImageProcessing.SpecialEffects.BricksTextureCommand
Leadtools.ImageProcessing.SpecialEffects.CanvasCommand
Leadtools.ImageProcessing.SpecialEffects.CloudsCommand
Leadtools.ImageProcessing.SpecialEffects.ColoredBallsCommand
Leadtools.ImageProcessing.SpecialEffects.DiffuseGlowCommand
DisplacementCommandクラス
Leadtools.ImageProcessing.SpecialEffects.FragmentCommand
Leadtools.ImageProcessing.Core.HalfTonePatternCommand
MaskConvolutionCommandクラス
Leadtools.ImageProcessing.SpecialEffects.MosaicTilesCommand
OffsetCommandクラス
Leadtools.ImageProcessing.SpecialEffects.PerspectiveCommand
Leadtools.ImageProcessing.SpecialEffects.PlasmaCommand
Leadtools.ImageProcessing.SpecialEffects.PointillistCommand
Leadtools.ImageProcessing.SpecialEffects.RomanMosaicCommand
Leadtools.ImageProcessing.SpecialEffects.VignnetCommand
Leadtools.ImageProcessing.SpecialEffects.ZigZagCommand
Leadtools.ImageProcessing.Color.AdjustTintCommand
ColorHalftoneCommandクラス