Harlequin RIP SDK

Simple example showing how to create and use custom color spaces using the core color management module interface. More...

#include "std.h"
#include "cmm_example.h"
#include "cmm_examplepriv.h"
#include "cmm_common.h"

Data Structures

struct  CCS_PROFILE
 Description of a profile specific to the Custom Color Space example module. More...
 
struct  CCS_TRANSFORM
 Description of a transform specific to the Custom Color Space example module. More...
 

Typedefs

typedef void(* ColorMappingFunc) (float colorIn[], float colorOut[])
 
typedef struct CCS_PROFILE CCS_PROFILE
 Description of a profile specific to the Custom Color Space example module.
 
typedef struct CCS_TRANSFORM CCS_TRANSFORM
 Description of a transform specific to the Custom Color Space example module.
 

Functions

static sw_cmm_result ccs_construct (sw_cmm_instance *instance)
 Construct an instance of the sw_cmm_api interface. More...
 
static sw_cmm_result ccs_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...
 
sw_cmm_apiexampleccs_getInstance (void)
 Return the singleton instance of a sw_cmm_api object containing details specific to the Custom Color Space example module. More...
 
static void invertRGB (float rgbIn[], float rgbOut[])
 Function to invert an RGB color value. More...
 
static void brightenRGB (float rgbIn[], float rgbOut[])
 Function to brighten an RGB color value. More...
 
static void passthroughRGB (float rgbIn[], float rgbOut[])
 Function to pass through an RGB color value. More...
 
static void maxinkCMYK (float cmykIn[], float cmykOut[])
 Function to apply simple 100% maximum ink function to an CMYK color value. More...
 
static void MtoNSpots (float sixIn[], float sevenOut[])
 Function to convert from 6 to 7 colorants. Intended for transferring color values for set of input colorants in the non-standard order of: More...
 
void ccs_close_profile (sw_cmm_instance *instance, sw_cmm_profile profile)
 Close a profile with a handle previously created with ccs_open_custom_colorspace(). More...
 
sw_cmm_custom_colorspaceccs_declare_custom_colorspace (sw_cmm_instance *instance, uint32 index)
 Declare a custom color space to the RIP. More...
 
sw_cmm_result ccs_open_custom_colorspace (sw_cmm_instance *instance, uint32 index, sw_cmm_profile *handle)
 Create an internal profile structure for a custom colorspace. More...
 
sw_cmm_result ccs_open_transform (sw_cmm_instance *instance, sw_cmm_profile profiles[], uint32 num_profiles, int32 intents[], HqBool black_point_compensations[], uint32 *num_input_channels, uint32 *num_output_channels, sw_cmm_transform *handle)
 Create a transform structure. More...
 
void ccs_close_transform (sw_cmm_instance *instance, sw_cmm_transform transform)
 Close a transform previously opened with ccs_open_transform(). More...
 
sw_cmm_result ccs_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...
 

Variables

static sw_cmm_custom_colorspace gCCSArray []
 Array of supported custom color spaces.
 
static sw_cmm_api gCCSExampleImplementation
 Singleton instance describing this alternate CMM.
 

Detailed Description

Simple example showing how to create and use custom color spaces using the core color management module interface.

Typedef Documentation

◆ ColorMappingFunc

typedef void(* ColorMappingFunc) (float colorIn[], float colorOut[])

Color modifying callback function.

Function Documentation

◆ brightenRGB()

static void brightenRGB ( float  rgbIn[],
float  rgbOut[] 
)
static

Function to brighten an RGB color value.

Parameters
[in]rgbInAn array containing a single RGB input value.
[out]rgbOutAn array containing a single RGB output value.

◆ invertRGB()

static void invertRGB ( float  rgbIn[],
float  rgbOut[] 
)
static

Function to invert an RGB color value.

Parameters
[in]rgbInAn array containing a single RGB input value.
[out]rgbOutAn array containing a single RGB output value.

◆ maxinkCMYK()

static void maxinkCMYK ( float  cmykIn[],
float  cmykOut[] 
)
static

Function to apply simple 100% maximum ink function to an CMYK color value.

Parameters
[in]cmykInAn array containing a single CMYK input value.
[out]cmykOutAn array containing a single CMYK output value.

◆ MtoNSpots()

static void MtoNSpots ( float  sixIn[],
float  sevenOut[] 
)
static

Function to convert from 6 to 7 colorants. Intended for transferring color values for set of input colorants in the non-standard order of:

[/S1 /S2 /Black /Cyan /Magenta /Yellow]

to

[/Cyan /Magenta /Yellow /Black /S1 /S2 /S3]

along with a scaling of the values to 70% of their value to make it obvious that the transform is being applied. The example is deliberately very simple.

Parameters
[in]sixInAn array containing a single 6-component input value.
[out]sevenOutAn array containing a single 7-component output value.

◆ passthroughRGB()

static void passthroughRGB ( float  rgbIn[],
float  rgbOut[] 
)
static

Function to pass through an RGB color value.

Parameters
[in]rgbInAn array containing a single RGB input value.
[out]rgbOutAn array containing a single RGB output value.