WindCommand Class (original) (raw)

Summary

Creates thin lines, directed along the specified angle, on the affected image. This method is available in the Imaging Pro and above toolkits.

Syntax

class WindCommand(RasterCommand): 

Example

Run the WindCommand on an image with a neighborhood Dimensions = 7x7 pixels.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.SpecialEffects; public void WindCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); // Prepare the command WindCommand command = new WindCommand(); command.Angle = 40; command.Dimension = 4500; command.Opacity = 0; // Apply wind effect on the image. 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:\LEADTOOLS22\Resources\Images"; }