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

This function applies an aging effect to make an image look older.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_aging(
        HIGEAR hIGear,
        AT_FLOAT saturation, 
        AT_FLOAT deviation, 
        AT_FLOAT imageContrast, 
        AT_FLOAT lineContrast, 
        AT_INT lineDensity, 
        AT_FLOAT agingColor[],
        AT_INT agingColorCount
);

Arguments:

Name Type Description
hIGear HIGEAR Image to which to apply aging effect.
saturation AT_FLOAT Adjusts color saturation of the original image. The value should range from 0 to 1, where 0 removes all color from the image and 1 does not adjust color saturation.
deviation AT_FLOAT Amount of noise to add to the image. The value should range from 0 to 50.
imageContrast AT_FLOAT Adjusts image contrast. The value should range from 0 to 1, where 0 is minimum contrast and 1 does not adjust contrast. Values less than 0 produce inverted contrast.
lineContrast AT_FLOAT Adjusts contrast of random vertical lines added to the image. The value should range from -1 to 1, where -1 is completely black lines, 0 is invisible lines, and 1 is completely white lines. Values between 0 and 1, for example, blend line color between original image pixel colors and white.
lineDensity AT_INT Adjusts density (quantity) of random vertical lines added to the image. The value should range from 0 to the width of the image in pixels, where 0 would add no lines, and the width of the image in pixels would fill the image with lines.
agingColor [ ] AT_FLOAT Adjusts color tint of the image. The color of the image will be tinted according to the values of the array. The array consists of three elements which represent color adjustment factors, corresponding to image color space. Each element ranges from -1 to 1, where a value of 0 represents no change to the image's color component, -1 represents completely change to the color component's minimum value, and 1 represents complete change to the color component's maximum value.
agingColorCount AT_INT Number of entries in the agingColor array. Must be equal to number of channels in the image.

Return Value:

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

Supported Raster Image Formats:

Indexed RGB  with grayscale palette – 2…8 bpp
Grayscale, with no Grayscale LUT attached – 2…16 bpp
RGB – 3…48 bpp

Sample:

Image Processing

Remarks:

The effect can adjust image saturation and contrast, and add noise and random vertical lines to the image.