←Select platform

OceanCommand Class

Summary
Reflects the image on an ocean surface. This command is available in the Imaging and above toolkits.
Syntax
C#
C++/CLI
Python
public class OceanCommand : RasterCommand 
public ref class OceanCommand : public RasterCommand   
class OceanCommand(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.

Ocean Function - Before

Ocean Function - Before

Ocean Function - After

Ocean Function - After

View additional platform support for this Ocean function.

Example

Run the OceanCommand on an image.

C#
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:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.ImageProcessing.SpecialEffects Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.