Clouds method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short Clouds(ILEADRaster * pRaster, long lSeed, long lFrequency, long lDensity, long lOpacity, OLE_COLOR crBackColor, OLE_COLOR crCloudsColor, CloudsEffectConstants Flags);

Overview

Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above only) Applies cloud effects to a bitmap.

The lSeed parameter allows you to change the shape of the cloud effect. The clouds are created using a pseudo-random process based on the value of the lSeed parameter. Each lSeed parameter value produces a different cloud effect from the other lSeed parameter values.

Use the CLD_PURE flag to create a bitmap of the cloud effect by itself.

When using the CLD_OPACITY flag, if the opacity is 0, the resulting pixel value relies entirely on the value of the original pixel. As the opacity increases to 100, the value of the cloud pixel has an increasing effect on the resulting pixel value.

When using the CLD_DIFFERENCE flag, if the opacity is 0, the resulting pixel value is just the absolute difference between the original pixel value and the cloud pixel value. As the opacity increases, the resulting pixel value is increasingly affected by an additional factor related to the absolute difference.

The following two figures illustrate the cloud effect by itself.

image\cldpuredensity1freq16.gif

This figure was obtained by using the following settings:

Parameter

Value

lFrequency

16

lDensity

1

crBackColor

Black

crCloudsColor

White

lSeed

0

Flags

CLD_PURE

image\cldpuredensity16freq1.gif

This figure was obtained by using the following settings:

Parameter

Value

lFrequency

1

lDensity

16

crBackColor

Black

crCloudsColor

White

lSeed

0

Flags

CLD_PURE

The following two figures show the effects of the method using the CLD_OPACITY flag. If you use the following image

image\cloudsopacity0.gif

And call this method using the following values:

Parameter

Value

lFrequency

16

lDensity

16

crBackColor

Black

crCloudsColor

White

lSeed

0

Flags

CLD_OPACITY

lOpacity

50

The following figure results:

image\cloudsopacity50.gif

This method can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, Dry method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method.

Topics:

Raster Images: Artistic Effects.