Leadtools.ImageProcessing.SpecialEffects Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
DiffuseGlowCommand Constructor(Int32,Int32,Int32,Int32,RasterColor)
See Also  Example
Leadtools.ImageProcessing.SpecialEffects Namespace > DiffuseGlowCommand Class > DiffuseGlowCommand Constructor : DiffuseGlowCommand Constructor(Int32,Int32,Int32,Int32,RasterColor)



glowAmount
Glow intensity, expressed in tenths of a percent. Possible values range from -1000 - 1000. Use positive values to add glow to the brighter regions of the image, and negative values to add glow to the darker regions of the image.
clearAmount
Value that represents how deeply the glow will penetrate into the non-glowing areas, expressed in tenths of a percent. Possible values range from 0 - 1000. A value of 0 indicates total glow diffusion, whereas a value of 1000 indicates the glow does not penetrate into any of the non-glowing areas.
spreadAmount
Value that represents the amount of blur in the glow diffusion, from 0 to 100 pixels. Possible values range from 0 - 1000. A value of 0 indicates none of the glow is diffused, whereas a value of 1000 indicates maximum diffusion.
whiteNoiseRange
Percent of the image to be covered with added pixels, expressed in tenths of a percent. The pixels will be added randomly. Possible values range from 0 - 1000.
glowColor
The RasterColor value that specifies the glow color.
Initializes a new DiffuseGlowCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration)  
Public Function New( _
   ByVal glowAmount As Integer, _
   ByVal clearAmount As Integer, _
   ByVal spreadAmount As Integer, _
   ByVal whiteNoiseRange As Integer, _
   ByVal glowColor As RasterColor _
)
Visual Basic (Usage) Copy Code
Dim glowAmount As Integer
Dim clearAmount As Integer
Dim spreadAmount As Integer
Dim whiteNoiseRange As Integer
Dim glowColor As RasterColor
 
Dim instance As DiffuseGlowCommand(glowAmount, clearAmount, spreadAmount, whiteNoiseRange, glowColor)
C#  
public DiffuseGlowCommand( 
   int glowAmount,
   int clearAmount,
   int spreadAmount,
   int whiteNoiseRange,
   RasterColor glowColor
)
C++/CLI  
public:
DiffuseGlowCommand( 
   int glowAmount,
   int clearAmount,
   int spreadAmount,
   int whiteNoiseRange,
   RasterColor glowColor
)

Parameters

glowAmount
Glow intensity, expressed in tenths of a percent. Possible values range from -1000 - 1000. Use positive values to add glow to the brighter regions of the image, and negative values to add glow to the darker regions of the image.
clearAmount
Value that represents how deeply the glow will penetrate into the non-glowing areas, expressed in tenths of a percent. Possible values range from 0 - 1000. A value of 0 indicates total glow diffusion, whereas a value of 1000 indicates the glow does not penetrate into any of the non-glowing areas.
spreadAmount
Value that represents the amount of blur in the glow diffusion, from 0 to 100 pixels. Possible values range from 0 - 1000. A value of 0 indicates none of the glow is diffused, whereas a value of 1000 indicates maximum diffusion.
whiteNoiseRange
Percent of the image to be covered with added pixels, expressed in tenths of a percent. The pixels will be added randomly. Possible values range from 0 - 1000.
glowColor
The RasterColor value that specifies the glow color.

Example

Run the DiffuseGlowCommand on an image and applies the Diffuse Glow filter.

Visual Basic Copy Code
Public Sub DiffuseGlowConstructorExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

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

   ' Prepare the command
   Dim fillColor As New RasterColor(255, 255, 255)
   Dim command As New DiffuseGlowCommand(50, 50, 10, 10, fillColor)
   command.Run(leadImage)
   codecs.Save(leadImage, LeadtoolsExamples.Common.ImagesPath.Path + "Result.jpg", RasterImageFormat.Jpeg, 24)

   RasterCodecs.Shutdown()
End Sub
C# Copy Code
public void DiffuseGlowConstructorExample() 

   // Load an image 
   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg"); 
 
   // Prepare the command 
   RasterColor fillColor = new RasterColor(255, 255, 255) ; 
   DiffuseGlowCommand command = new DiffuseGlowCommand(50, 50, 10, 10, fillColor); 
   command.Run(image); 
   codecs.Save(image, LeadtoolsExamples.Common.ImagesPath.Path + "Result.jpg", RasterImageFormat.Jpeg, 24); 
 
   RasterCodecs.Shutdown(); 
}

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