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



Adds a pseudo-3D wave effect to the image by drawing lines across the image, basing the line's height at each point on its brightness at that point. This command is available in the Raster Pro and above toolkits.

Syntax

Visual Basic (Declaration)  
Public Class RevEffectCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage) Copy Code
Dim instance As RevEffectCommand
C#  
public class RevEffectCommand : RasterCommand, IRasterCommand  
C++/CLI  
public ref class RevEffectCommand : public RasterCommand, IRasterCommand  

Example

Run the RevEffectCommand on an image.

Visual Basic Copy Code
Public Sub RevEffectCommandExample()
   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 command As RevEffectCommand = New RevEffectCommand
   command.LineSpace = 3
   command.MaximumHeight = 35
   'Apply Rev effect on the image.
   command.Run(leadImage)
   codecs.Save(leadImage, LeadtoolsExamples.Common.ImagesPath.Path + "Result.jpg", RasterImageFormat.Jpeg, 24)

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

   // 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 
   RevEffectCommand command = new RevEffectCommand(); 
   command.LineSpace = 3; 
   command.MaximumHeight = 35; 
   //Apply Rev effect on the image. 
   command.Run(image); 
   codecs.Save(image, LeadtoolsExamples.Common.ImagesPath.Path + "Result.jpg", RasterImageFormat.Jpeg, 24); 
 
   RasterCodecs.Shutdown(); 
}

Remarks

  • This command adds a pseudo-3D wave effect to the image . It is similar to the Rutt-Etra Video Synthesizer. The Rutt-Etra video synthesizer was a processor that modulated the deflection lines of a television image so that they appeared to adopt the contours of objects. It was invented by Steve Rutt and Bill Etra in the 1970s.
  • With this command, you set the maximum height to be used for the pixels with the maximum brightness value. The other pixel heights are calculated by linear interpolation. Each line is 1 pixel in width. Control the spacing between the lines that are drawn across the image with the LineSpace parameter.
  • You can get a more stable wave by performing the following:
    1. Apply any type of blur like GaussianCommand blur with a large radius value.
    2. Apply the RevEffectCommand and pass a small value for the maximum height.
    3. This command does not support 32-bit grayscale images.
  • This command supports 12- and 16-bit grayscale and 48- and 64-bit color images. Support for 12- and 16-bit grayscale and 48- and 64-bit color images is available only in the Document/Medical toolkits.
  • This command does not support signed data images.
For more information, refer to Applying Artistic Effects.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.SpecialEffects.RevEffectCommand

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