ImageGear for C and C++ on Windows v19.8 - Updated
IG_FX_emboss
API Reference Guide > Core Component API Reference > Core Component Functions Reference > FX Functions > IG_FX_emboss

This function produces an embossed or 3-D like chiseled-in-stone look to the image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_emboss (
        HIGEAR hIGear, 
        const LPAT_RECT lpRect, 
        const DOUBLE dblStrength, 
        const AT_MODE nCompassDir 
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpRect const LPAT_RECT Far pointer to an AT_RECT struct specifying the rectangular portion of the image to be processed. Set = NULL for whole image. Before ImageGear performs this operation, it will check to see if an internal flag has been set to TRUE to make a mask active for this HIGEAR image. If a mask is active, and a valid pointer to a mask can be found, ImageGear will override the settings passed to this structure in favor of the non-rectangular ROI defined by the mask.
dblStrength const DOUBLE The embossing strength. The valid range is from 1.0 to 5.0.
ncompassDir const AT_MODE

An AT_MODE Compass direction constants (see accucnst.h file):

  • IG_COMPASS_N - North direction
  • IG_COMPASS_NE - North-East direction
  • IG_COMPASS_E - East direction
  • IG_COMPASS_SE - South-East direction
  • IG_COMPASS_S - South direction
  • IG_COMPASS_SW - South-West direction
  • IG_COMPASS_W - West direction
  • IG_COMPASS_NW - North-West direction

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++, except:
Indexed RGB with non-grayscale palette;
Images that have a Grayscale LUT attached to them.

Sample:

FlashPix

Example:

 
Copy Code
HIGEAR hIGear;           /* HIGEAR handle of image  */
AT_RECT rcImageRect;    /* Image's current image rectangle  */
/* Emboss only the image rect portion: */
IG_FX_emboss ( hIGear, &rcImageRect, 3.0, IG_COMPASS_NE );

Remarks:

The result looks similar to the engraved face of a coin. The greater the value of dblStrength, the greater the effect will be (higher ridges and lower depressions). The direction in which the image will appear elevated is selected by nCompassDir.

This function, like other ImageGear Image Processing and Clipboard API calls, takes an AT_RECT structure as an argument, so that you can process a rectangular sub-region of an image. However, before ImageGear performs the operation specified by this function, it will check to see if an internal flag has been set to TRUE, indicating that a mask HIGEAR should be used with the image. If the flag is set to TRUE, and a valid pointer to a mask image has been assigned, ImageGear will override the settings passed to the AT_RECT structure and use the non-rectangular ROI defined by the mask HIGEAR. To create a non-rectangular region of interest, call IG_IP_NR_ROI_to_HIGEAR_mask().

Please see the descriptions of IG_IP_NR_ROI_mask_associate() and IG_IP_NR_ROI_to_HIGEAR_mask() for more details.