ImageGear Professional DLL v18.1 for Windows
IG_dspl_LUT_set
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_LUT_set

Glossary Item Box

This function assigns new values to red, green, and blue look-up tables.

Declaration:

  Copy Code
AT_ERRCOUNT  ACCUAPI  IG_dspl_LUT_set(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwGrpID,
        [IN] AT_MODE nFlags,
        [IN] const LPBYTE lpRLUT,
        [IN] const LPBYTE lpGLUT,
        [IN] const LPBYTE lpBLUT
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
dwGrpID DWORD Identifier of group in which to set LUT options.
nFlags AT_MODE Specify which look-up tables to set. Possible value is 0 or a combination of flags IG_DSPL_R_CHANNEL - if this flag is set then the lpRLUT parameter of this function is not ignored IG_DSPL_G_CHANNEL - if this flag is set then the lpGLUT parameter of this function is not ignored IG_DSPL_B_CHANNEL - if this flag is set then the lpBLUT parameter of this function is not ignored The constant IG_DSPL_ALL_CHANNELS is defined for convenience and can be used to set all three channels.
  Copy Code
#define IG_DSPL_ALL_CHANNELS
(IG_DSPL_R_CHANNEL|IG_DSPL_G_CHANNEL|IG_
DSPL_B_CHANNEL)
lpRLUT const LPBYTE Pointer to a 256 element array of a red look-up table to set. If NULL, then identity the array is assigned to RedLut option.
lpGLUT const LPBYTE Pointer to a 256 element array of a green look-up table to set. If NULL, then identity the array is assigned to GreenLut option.
lpBLUT const LPBYTE Pointer to a 256 element array of a blue look-up table to set. If NULL, then identity the array is assigned to BlueLut option.

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.

Sample:

None

Example:

  Copy Code
HIGEAR    hIGear;         /* HIGEAR handle of image  */ 
DWORD    nGrpID;        /* display group identifier  */
BYTE     lut[256];      /* lookup array  */
INT      i;
 ...
/* set inverted look-up table */
for( i = 0; i<256; i++ )
        lut[i] = 255 - i;
IG_dspl_LUT_set( hIGear, nGrpID, IG_DSPL_ALL_CHANNELS, lut, lut, lut );

Remarks:

ImageGear always makes a copy of lpRLUT, lpGLUT and lpBLUT in case they are needed, but does not assign pointers directly so that the application should cleanup the memory allocated for them.
©2014. Accusoft Corporation. All Rights Reserved.