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

This function applies a lens flare effect to the image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_lens_flare(
        HIGEAR  hIGear, 
        AT_INT  xPos, 
        AT_INT  yPos, 
        AT_DOUBLE primaryBrightness, 
        AT_DOUBLE secondaryBrightness,
        AT_MODE  flareType
);

Arguments:

Name Type Description
hIGear HIGEAR Image to which to apply lens flare effect.
xPos AT_INT X coordinate of the primary flare.
yPos AT_INT Y coordinate of the primary flare.
primaryBrightness AT_DOUBLE Brightness of the primary flare. This value should range from 0 to 1.
secondaryBrightness AT_DOUBLE Brightness of the secondary flare. This value should range from 0 to 1.
flareType AT_MODE Predefined flare type to use. Determines the shape and appearance of the lens flare elements.

Return Value:

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

Supported Raster Image Formats:

RGB – 3…48 bpp
RGBA – 4…64 bpp
RGBPA – 4…64 bpp
RGBEx – 1..16 bpc
RGBAEx – 1..16 bpc
RGBPAEx – 1..16 bpc

Sample:

Image Processing

Remarks:

The effect simulates a bright light, such as the sun, and some reflections within the lens. It is typically used to add a sense of drama or realism to a photographic image.