Harlequin RIP SDK

CMM Implementation of an example module that preserves pure colors and uses the RIP's built-in ICC CMM for non-pure colors. More...

#include "std.h"
#include "lcms2.h"
#include "skinkit.h"
#include "skinmon.h"
#include "swdataapi.h"
#include "cmm_common.h"
#include "cmm_littlecmspriv.h"
#include "cmm_purecolor.h"

Data Structures

struct  cmmParams
 Internal structure holding the optional params used by this CCS example. More...
 
struct  PURECOLOR_PROFILE
 Description of a profile specific to the PureColor example module. More...
 
struct  PURECOLOR_TRANSFORM
 Description of a transform specific to the PureColor example module. More...
 
struct  PURECOLOR_INSTANCE
 Subclass the instance to hold params controlling how to apply pure color. This follows the recommendation for sw_cmm_instance. More...
 

Macros

#define NUM_CMYK_CHANNELS   (4)
 The number of output channels assumed by the PureColorTest mode.
 

Typedefs

typedef struct cmmParams cmmParams
 Internal structure holding the optional params used by the PureColor CMM example.
 
typedef struct PURECOLOR_PROFILE PURECOLOR_PROFILE
 Description of a profile specific to the PureColor example module.
 
typedef struct PURECOLOR_TRANSFORM PURECOLOR_TRANSFORM
 Description of a transform specific to the PureColor example module.
 
typedef struct PURECOLOR_INSTANCE PURECOLOR_INSTANCE
 Subclass the instance to hold params controlling how to apply pure color. This follows the recommendation for sw_cmm_instance.
 

Functions

static sw_cmm_result purecolor_construct (sw_cmm_instance *instance)
 Construct an instance of the sw_cmm_api interface. More...
 
static sw_cmm_result purecolor_open_profile (sw_cmm_instance *instance, sw_blob_instance *ICC_profile, sw_cmm_profile *handle)
 Create an internal profile structure for ICC profile data stored in memory. More...
 
static void purecolor_close_profile (sw_cmm_instance *instance, sw_cmm_profile profile)
 Close a profile with a handle previously created by purecolor_open_profile(). More...
 
static sw_cmm_result purecolor_open_transform2 (sw_cmm_instance *instance, sw_cmm_profile profiles[], uint32 num_profiles, int32 intents[], HqBool black_point_compensations[], HqBool compositing, sw_cmm_object_type object_type, sw_cmm_color_model color_model, uint32 *num_input_channels, uint32 *num_output_channels, sw_cmm_transform *handle)
 Create a transform structure for the example CMM. More...
 
void purecolor_close_transform (sw_cmm_instance *instance, sw_cmm_transform transform)
 Close a transform previously opened with purecolor_open_transform2(). More...
 
static sw_cmm_result purecolor_invoke_transform (sw_cmm_instance *instance, sw_cmm_transform transform, float *input_data, float *output_data, uint32 num_pixels)
 Use the specified transform to adjust color data. More...
 
sw_cmm_apipurecolor_getInstance ()
 Return the singleton instance of a sw_cmm_api object containing details specific to Pure Color CMM example module. More...
 
static void initParams (PURECOLOR_INSTANCE *pcInstance)
 Helper function for purecolor_construct(). It initialises the params in pcInstance->cmmParams.
 
static sw_cmm_result getParams (PURECOLOR_INSTANCE *pcInstance, sw_datum *params)
 Helper function for purecolor_construct(). It extracts the params from the params parameter, and stores them in pcInstance->cmmParams. This translates from the sw_datum dict, which is a representation of the original PostScript dictionary, to the more standard "C" structure. The keys processed match the elements of struct cmmParams. If the type of the value for each key doesn't match the expected type, or if unknown keys are present, a failure code is returned. Otherwise SW_CMM_SUCCESS is returned.
 

Variables

static sw_cmm_api gImplementation
 Singleton implementation describing this alternate CMM.
 

Detailed Description

CMM Implementation of an example module that preserves pure colors and uses the RIP's built-in ICC CMM for non-pure colors.