ImageGear Professional DLL v17.1 for Windows Accusoft
IG_FX_solarize
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > FX Functions > IG_FX_solarize

Glossary Item Box

The Solarize effect mimics the accidental exposure of photographic film to light, by inverting the colors of pixels whose lightness exceeds a given threshold.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_solarize(
        HIGEAR hIGear,
        AT_INT nThreshold
);

Arguments:

hIGear Image to which to apply the effect.
nThreshold Specifies minimum intensity at which the pixels should be inverted.

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 – 1 bpp;
Indexed RGB with non-grayscale palette;
Grayscale – 1 bpp;
Images that have a Grayscale LUT attached to them.

Sample:

Image Processing

Remarks:

To calculate the threshold, use the following formula:

  Copy Code
2^bpc (i.e., 24bit RGB is 8bpc, 2^8 = 256, hence the range is 0 to 256)
©2012. Accusoft Corporation. All Rights Reserved.