This function blurs an image.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_FX_blur ( HIGEAR hIGear, const LPAT_RECT lpRect, const AT_MODE nBlurMode ); |
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. |
nBlurMode | const AT_MODE | A constant such as IG_BLUR_3 specifying the kernel size to use to perform the blurring. See file accucnst.h for the IG_BLUR_ constants available. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
All pixel formats supported by ImageGear Professional, except:
Indexed RGB with non-grayscale palette
Sample:
None
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ AT_RECT rcImageRect; /* Image's current image rectangle */ /* Blur only the image rect portion, using a 5 x 5 kernel: */ IG_FX_blur ( hIGear, &rcImageRect, IG_BLUR_5 ); |
Remarks:
nBlurMode controls the degree of blurring.
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. |