This method produces a ripple like effect on a raster image.

[Visual Basic]Public Function Ripple(amplitude As Double, waveLength As Double, phase As Double, smear As Boolean, reflective As Boolean, red As Byte, green As Byte, blue As Byte) As Boolean
[C#]public bool Ripple(double amplitude, double waveLength, double phase, bool smear, bool reflective, byte red, byte green, byte blue);

Parameters

amplitude
   Sets the amplitude or height of the ripples. As this value increases the ripples become higher

waveLength
   Sets the wavelength or distance from the crest of one wave to the crest of the next wave. As this value increases there are few ripples produced

phase
   Sets the phase or shift in the wave cycle

smear
   Sets whether empty spaces are filled with color from adjacent pixels or from the color set as a background color [False: spaces filled with background color, True:spaces filled with the color of the adjacent pixels]

reflective
   Causes a reflective effect from one ripple to the next (Best used with small amplitudes) [False:No reflection, True: reflection]

red
   The red component of the background color (from 0 to 255)

green
   The green component of the background color (from 0 to 255)

blue
   The blue component of the background color (from 0 to 255)

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The Ripple method produces a ripple like effect on a raster image.

To execute the Ripple method, set the image handle of the image in the Image property or the Layer(LayerNumber).Image property. The Ripple method supports 8 bit grayscale, 16, 24, and 32 bit images.

Before executing the Ripple method, you must set the area on the image that will be affected. There are 4 ways to do this.

  1. To use a mask image, set the SelectMode property to EffectMask. Set the mask image handle in the SourceMask property
  2. To process the total image, set the SelectMode property to EffectAll
  3. To process the polygonal area on the image, set the SelectMode property to EffectPolygon. Select the polygon by setting the appropriate coordinate values for the points of the polygon in the Point property
  4. To process an elliptical area on the image, set the SelectMode property to EffectEllipse. Select the ellipse by setting the appropriate values for the bounding rectangle in the Rect property

When the SelectMode property is set to EffectPolygon or EffectEllipse, the appropriate values must be set in the Inside property.

If the Ripple method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.

If the Ripple method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.

See Also

ImageKit.Effect Members | Newtone.ImageKit.Wpf.ImageKit

The ImageKit WPF is created by Newtone Corporation