The Solarize effect mimics the accidental exposure of photographic film to light, by inverting the colors of pixels whose lightness exceeds a given threshold.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_FX_solarize( HIGEAR hIGear, AT_INT nThreshold ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | Image to which to apply the effect. |
nThreshold | AT_INT | Specifies minimum intensity at which the pixels should be inverted. |
Returns the number of ImageGear errors that occurred during this function call.
All pixel formats supported by ImageGear for C and C++, except:
Indexed RGB – 1 bpp;
Indexed RGB with non-grayscale palette;
Grayscale – 1 bpp;
Images that have a Grayscale LUT attached to them.
Image Processing
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) |