Define the following global variables:
ClrHandle : THandle;
params : CONVERSION_PARAMS;
RGBColor : array[0..2] of UCHAR;
ColorSpace : array[0..3] of UCHAR;
Set the conversion options by filling a CONVERSION_PARAMS structure:
ZeroMemory(Pointer(@params), SizeOf(CONVERSION_PARAMS));
params.uStructSize := SizeOf(CONVERSION_PARAMS);
params.nMethod := USE_CUSTOM_ICC;
params.nActiveMethod := USE_CUSTOM_ICC;
New(params.pWpoint);
params.pWpoint.nWhitePoint := CIELAB_D50;
StrCopy (params.sInputProfile, "C:\MyCMYKProfile.ICM");
StrCopy (params.sOutputProfile, "C:\MyRGBProfile.ICM");
params.pMemInputProfile := nil;
params.pMemOutputProfile := nil;
Initialize the color conversion handle with L_ClrInit():
L_ClrInit(@ClrHandle, CCS_CMYK, CCS_RGB, @params);
Now, do the conversion:
ColorSpace[0] := 100;
ColorSpace[1] := 100;
ColorSpace[2] := 100;
ColorSpace[3] := 100;
L_ClrConvert(ClrHandle, Pointer(ColorSpace), Pointer(RGBColor), 1, 1, 0, 0);
At the end, free the color conversion handle:
L_ClrFree(ClrHandle);