←Select platform

OceanCommand Class

Summary

Reflects the image on an ocean surface. This command is available in the Imaging Proo and above toolkits.

Syntax
C#
VB
C++
public class OceanCommand : RasterCommand 
  
Public Class OceanCommand  
   Inherits RasterCommand 
public ref class OceanCommand : public RasterCommand   

Remarks
  • If the image has a region, the effect will be applied on the region only.
  • For an example, see the following figure:

    ocean-before.jpg

    The following figure shows the same image, after the effect has been applied:

    ocean-after.jpg

    To obtain this effect, the following settings were used with the method:

    1. Amplitude = 15
    2. Frequency = 20
    3. LowerTransparency = true
    4. This command does not support 32-bit grayscale images.
  • This command supports 12-bit and 16-bit grayscale and 48-bit and 64-bit color images. Support for 12-bit and 16-bit grayscale and 48-bit 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 Correcting Colors.

Example

Run the OceanCommand on an image.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.SpecialEffects; 
 
public void OceanCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); 
 
   // Prepare the command 
   OceanCommand command = new OceanCommand(); 
   command.Amplitude = 20; 
   command.Frequency = 6; 
   command.LowerTransparency = true; 
   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"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing.SpecialEffects 
 
Public Sub OceanCommandExample() 
   Dim codecs As New RasterCodecs() 
   codecs.ThrowExceptionsOnInvalidImages = True 
 
   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")) 
 
   ' Prepare the command 
   Dim command As OceanCommand = New OceanCommand 
   command.Amplitude = 20 
   command.Frequency = 6 
   command.LowerTransparency = True 
   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 

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.SpecialEffects Assembly