This function reduces a 24-bit image to an 8-bit image while retaining its most popular, or prevalent, colors.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_color_reduce_popularity ( HIGEAR hIGear, BOOL bFastRemap, UINT nMaxColors ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle of image. |
bFastRemap | BOOL | Set = TRUE for reduction algorithm optimized for speed. Set = FALSE for algorithm optimized for quality. |
nMaxColors | UINT | Number of colors to which to reduce. |
Returns the number of ImageGear errors that occurred during this function call.
RGB – 24 bpp.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ /* Reduce to 64 colors using octree algorithm */ IG_IP_color_reduce_popularity ( hIGear, FALSE, 64 ); |
Use nMaxColors to specify the maximum number of colors wanted in the result.