IMFADE

Purpose:

Fades an image horizontally or vertically by adjusting its alpha channel.

Syntax:

IMFADE(image, percent, direction)

image

-

An array, the source image.

percent

-

Optional. A real from 0.0 to 1.0. The fraction of the image to fade. Defaults to 1.0, fade the entire image.

direction

-

Optional. An integer, the fade direction.

0:

Left to right (default).

1:

Right to left.

2:

Bottom to top.

3:

Top to bottom.

Returns:

An image with the applied fade.

Example:

W1: readimage(gethome + "\data\mandrill.bmp")

W2: imfade(w1);setaspect(-1)

W3: imfade(w1, 0.5, 1);setaspect(-1)

W4: imfade(w3, 0.5, 3);setaspect(-1)

 

Alpha Channel Fade

 

W1 loads a color BMP image.

W2 fades the entire image from the left.

W3 fades 50% of the image from the right.

W4 fades 50% of W3 from the top. The result is the original image faded both from the right and from the top.

Remarks:

IMFADE performs a linear fade by gradually reducing the alpha channel from fully opaque to transparent.

The percent parameter controls how far across (or down) image the fade extends.

See Also:

GETRGB

IMAGE24

IMCOMBINE

LINSPACE

READIMAGE

RGBIMAGE