CreateFadedMask method (ILEADRasterProcess)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short CreateFadedMask(ILEADRaster *pRaster, ILEADRaster *pRasterMask, short iLength, short iFadeRate, short iStepSize, short iInflate, FadedMaskConstants Flag, short iMaxGray, OLE_COLOR crTransparent);

Overview

Refer to Combining Images.

Remarks

(DigitalPaint only) Creates a fade mask bitmap in which the color of each pixel is changed with respect to its position in the bitmap. This change depends on the fade rate. This method is only available in the DigitalPaint toolkits.

This method is concerned with the size and shape of the region, not the bitmap itself. Therefore, any bitmap with a region can be used to create a fade mask bitmap. The fade mask bitmap can be used by the FeatherAlphaBlend method to combine two bitmaps with feathering.

If the FADE_OUTER flag is not set, then the size of the fade mask bitmap is equal to the size of a region and the fade progresses toward the center of the region. If the FADE_OUTER flag is set, the size is equal to the size of region plus the iInflate value and the fade starts at the edge of the region and progresses toward the edge of the fade mask bitmap. (The iInflate parameter is used only with FADE_OUTER flag).

In order to use the fade mask bitmap in the FeatherAlphaBlend method the fade mask bitmap must contain three portions:

a.

A portion in which the output (from the blending function) will be the same as the destination bitmap. This is called the Transparency portion of the mask and it’s filled with black.

b.

A portion in which the output is a combination of the destination and source bitmap.

c.

A portion in which the output comes from the source bitmap. This is called the Dump portion of the mask and it’s filled with white.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. 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:

Underlay method, Combine method, FeatherAlphaBlend method, AlphaBlend method

Topics:

Raster Images: Combining Images

 

Using Color Values in LEADTOOLS

 

Image Processing