Fades an image horizontally or vertically by adjusting its alpha channel.
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.
|
An image with the applied fade.
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)

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.
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.