Dialog Based Initialization

The Color Conversion C API provides a color space dialog that can be used to initialize a conversion. To do a dialog based initialization follow the steps below:

  1. Define the following global variables:

    HANDLE ClrHandle;   
     L_UCHAR *pRGBData;   
     L_UCHAR *pLABData;   
     L_INT nWidth;   
     L_INT nHeight;   
     L_INT nInAlign;   
     L_INT nOutAlign; 

  2. Display the color space dialog box to initialize as follows:

L_ClrDlg(DLG_LAB, NULL, &ClrHandle, NULL);

  1. Convert from RGB to CIELab as follows:

L_ClrConvert(ClrHandle, pRGBData, pLABData, nWidth, nHeight, nInAlign, nOutAlign);

  1. At the end, free the color conversion handle:

L_ClrFree(ClrHandle);

Help Version 22.0.2021.8.20
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Color Conversion C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.