ImageGear for C and C++ on Windows v20.3 - Updated
AT_IGGUI_IP_COLOR_REDUCE
API Reference Guide > GUI Component API Reference > GUI Component Structures Reference > AT_IGGUI_IP_COLOR_REDUCE

This structure is used by the IG_gui_ip_color_reduce_dlg function to reduce the number of bits per pixel for the original image using different methods.

Declaration:

 
Copy Code
typedef struct tag AT_IGGUI_IP_COLOR_REDUCE
{
        DWORD cbSize;
        UINT uFlags;
        HIGEAR hIGear;
        HWND hWnd;
        LPCHAR lpszTitle;
        UINT nBits;
        UINT nReduceType;
        INT nLevel;             
        UINT nMaxColors;                
        BOOL bFastRemap;                
        UINT nThreshold;                
        AT_MODE nOption;                
        UINT nWeightR;          
        UINT nWeightG;          
        UINT nWeightB;          
        AT_ERRCOUNT nErrCount;
        LPFNIGGUI_IP_UPDATE lpfnUpdateProc;
}AT_IGGUI_IP_COLOR_REDUCE;

Members:

Name Type Description
cbSize DWORD Specifies the length, in bytes, of the structure.
uFlags UINT A set of bit flags you can use to initialize the dialog box.
hIGear HIGEAR A handle of an image.
hWnd HWND A handle of the window to update.
lpszTitle LPCHAR A dialog title.
nBits UINT A number of bits per pixel after reduction.
nReduceType UINT A type of color reduction (see IG_IGGUI_IP_COLOR_REDUCE_ constants in accucnst.h file).
nLevel INT A threshold value for dithering, 0 to 255.
nMaxColors UINT A maximum number of colors (that is, maximum number of unique pixel values) you want in the resulting image. Must be between 16 and 256.
bFastRemap BOOL TRUE if you want the reduction algorithm optimized for speed. FALSE if you want the algorithm optimized for quality.
nThreshold UINT An integer value that specifies which pixel values will be changed to black, and which pixel values will be changed to white. Pixels with values greater than nThreshold will be changed to white, and pixels that have values less than nThreshold will be changed to black.
nOption AT_MODE A constant of type AT_MODE, such as IG_REDUCE_BITONAL_AVE, that specifies what type of reduction to perform. See accucnst.h for the complete list.
nWeightR UINT These values are only used if nOption is set to IG_REDUCE_BITONAL_WEIGHTED. The range of values is between 0 and 255.
nWeightG UINT The range of values is between 0 and 255.
nWeightB UINT The range of values is between 0 and 255.
nErrCount AT_ERRCOUNT The number of ImageGear errors that occurred during this function call.
lpfnUpdateProc LPFNIGGUI_IP_UPDATE A pointer to the function that is called when the 'Apply' button is clicked.

Is this page helpful?
Yes No
Thanks for your feedback.