Conversion Given an ICM Profile

  1. Define the following global variables:
    HANDLE ClrHandle;   
    CONVERSION_PARAMS params;   
    BYTE RGBColor[3];   
    BYTE ColorSpace[4]; 
  2. Set the conversion options by filling a CONVERSION_PARAMS structure:
    memset(&params, 0, sizeof(CONVERSION_PARAMS));   
       
    params.uStructSize = sizeof(CONVERSION_PARAMS);   
    params.nMethod = USE_CUSTOM_ICC;   
    params.nActiveMethod = USE_CUSTOM_ICC;   
    params.pWpoint = (LPWHITEPOINT)malloc(sizeof(WHITEPOINT));   
    params.pWpoint->nWhitePoint = CIELAB_D50;   
       
    params.pMemInputProfile = NULL;   
    params.pMemOutputProfile = NULL;   
       
    lstrcpy(params.sInputProfile, TEXT("C:\\MyCMYKProfile.ICM"));   
    lstrcpy(params.sOutputProfile, TEXT("C:\\MyRGBProfile.ICM")); 
  3. Initialize the color conversion handle with L_ClrInit():

L_ClrInit(&ClrHandle, CCS_CMYK, CCS_RGB, &params);

  1. Now, do the conversion:
    ColorSpace[0] = 100;   
    ColorSpace[1] = 100;   
    ColorSpace[2] = 100;   
    ColorSpace[3] = 100; 
     
    L_ClrConvert(ClrHandle, ColorSpace, RGBColor, 1, 1, 0, 0); 
  2. At the end, free the color conversion handle:

L_ClrFree(ClrHandle);

See Also

Introduction

Bitmap Conversion Options

Color Conversion C API Function Groups

Getting Started

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

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