Leadtools.ImageProcessing.SpecialEffects Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ColoredPencilExtendedCommandFlags Enumeration
See Also   Example
Leadtools.ImageProcessing.SpecialEffects Namespace : ColoredPencilExtendedCommandFlags Enumeration



This enumeration specifies the different types of coloring methods.

Syntax

Visual Basic (Declaration)  
Public Enum ColoredPencilExtendedCommandFlags 
   Inherits Enum
Visual Basic (Usage) Copy Code
Dim instance As ColoredPencilExtendedCommandFlags
C#  
public enum ColoredPencilExtendedCommandFlags : Enum 
C++/CLI  
public enum class ColoredPencilExtendedCommandFlags : public Enum 

Members

Member Description
Artistic Use artistic coloring, where no specific direction dominates the entire image.
Directional Use the direction specified by the Angle value when coloring the image.
CombineOriginal Combine the resulting image with the original one.

Example

Visual Basic Copy Code
' Run the ColoredPencilExtendedCommand on an image and applies the Colored Pencil Extended filter.
Public Sub ColoredPencilExtendedCommandExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "ImageProcessingDemo\NaturalFruits.jpg")

   ' Prepare the command
   Dim command As ColoredPencilExtendedCommand = New ColoredPencilExtendedCommand
   command.Size = 5
   command.Strength = 4
   command.Threshold = 0
   command.PencilRoughness = 250
   command.StrokeLength = 15
   command.PaperRoughness = 100
   command.Flags = ColoredPencilExtendedCommandFlags.Artistic
   command.Run(leadImage)

   codecs.Save(leadImage, LeadtoolsExamples.Common.ImagesPath.Path + "ImageProcessingDemo\Result - ColoredPencilExtendedCommandVB.jpg", RasterImageFormat.Jpeg, 24)
   RasterCodecs.Shutdown()
End Sub
C# Copy Code
// Run the ColoredPencilExtendedCommand on an image and applies the Colored Pencil Extended filter. 
public void ColoredPencilExtendedCommandExample() 

   // Load an image 
   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + @"ImageProcessingDemo\NaturalFruits.jpg"); 
 
   // Prepare the command 
   ColoredPencilExtendedCommand command = new ColoredPencilExtendedCommand(); 
   command.Size = 5; 
   command.Strength = 4; 
   command.Threshold = 0; 
   command.PencilRoughness = 250; 
   command.StrokeLength = 15; 
   command.PaperRoughness = 100; 
   command.Flags = ColoredPencilExtendedCommandFlags.Artistic; 
   command.Run(image); 
   codecs.Save(image, LeadtoolsExamples.Common.ImagesPath.Path + @"ImageProcessingDemo\Result - ColoredPencilExtendedCommandCS.jpg", RasterImageFormat.Jpeg, 24); 
 
   RasterCodecs.Shutdown(); 
}

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.ImageProcessing.SpecialEffects.ColoredPencilExtendedCommandFlags

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also