KCMS Application Developer's Guide

KcsEvaluate()

KcsStatusId
 KcsEvaluate(
 		KcsProfileId profile,
 		KcsOperationType operation,
 		KcsPixelLayout *srcData,
 		KcsPixelLayout *destData)

Purpose

Use KcsEvaluate() to apply a color profile to input color data to produce color-corrected output data.

See "KcsPixelLayout " for more information about using pixel layouts in this context.

Arguments

Table 4-7 KcsEvaluate() Arguments

Argument 

Description 

profile

The identifier of the profile to be applied to the input data. (If the operation specified when the profile was created in KcsConnectProfiles() does not match the operation specified in KcsEvaluate(), the status string KCS_EVAL_ONLY_ONE_OP_ALLOWED is returned. If, for example, your application wants to evaluate forward (specifies KcsOpForward in KcsEvaluate()) with a profile it creates with KcsConnectProfiles() to simulate (uses KcsOpSimulate in KcsConnectProfiles()), this particular status string would be returned.

operation

The kind of data to be operated on, and the kind of profile evaluation to be performed on, the data. (See "Operation Hint Constants" and "Content Hint Constants" more information.) Note that only 1 bit can be set for KcsEvaluate().

srcData

The description of the source color data to be transformed by the profile. 

destData

The description of the area (the destination) to which the transformed data is written. 

Returns

Table 4-8 KcsEvaluate() Return Strings

KCS_SUCCESS

KCS_OPERATION_CANCELLED

KCS_PROF_ID_BAD

KCS_MEM_ALLOC_ERROR

KCS_EVAL_ONLY_ONE_OP_ALLOWED

KCS_EVAL_TOO_MANY_CHANNELS

KCS_EVAL_BUFFER_OVERFLOW

KCS_LAYOUT_INVALID

KCS_LAYOUT_UNSUPPORTED

KCS_LAYOUT_MISMATCH

Example


Example 4-3 KcsEvaluate()

int 					op;
 KcsPixelLayout					pixelLayoutIn, pixelLayoutOut;
 KcsProfileId 					scannerProfile, monitorProfile;
 KcsProfileId					profileSequence[2], completeProfile;

 /* Load and connect profiles. */
 /* Load input and output pixel layout structures with appropriate data. */

 status = KcsEvaluate(completeProfile, op, &pixelLayoutIn,
 			&pixelLayoutOut);