CMM Implementation of the interface to the Microsoft's Image Color Management. More...
#include <windows.h>
#include <icm.h>
#include "std.h"
#include "cmm_common.h"
#include "cmm_icm2.h"
Data Structures | |
struct | ICM_TRANSFORM |
Description of a transform specific to the ICM2 example module. More... | |
struct | icm2_implementation |
A subclass of sw_cmm_api used to store class-private information. More... | |
Macros | |
#define | kInternalName "CMM_ICM2" |
#define | kDisplayName "Microsoft ICM2" |
Typedefs | |
typedef struct ICM_TRANSFORM | ICM_TRANSFORM |
Description of a transform specific to the ICM2 example module. | |
typedef struct icm2_implementation | icm2_implementation |
A subclass of sw_cmm_api used to store class-private information. More... | |
Functions | |
static HqBool | icm2_init (sw_cmm_api *implementation, const sw_cmm_init_params *params) |
Callback function to ask us to initialise the module. More... | |
static void | icm2_finish (sw_cmm_api *implementation) |
Callback function to ask us to tidy up when closing the module. More... | |
static sw_cmm_result | icm2_construct (sw_cmm_instance *instance) |
Construct an instance of the sw_cmm_api interface. More... | |
static sw_cmm_result | icm2_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 | icm2_close_profile (sw_cmm_instance *instance, sw_cmm_profile profile) |
Close a profile with a handle previously created with icm2_open_profile(). More... | |
static sw_cmm_result | icm2_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... | |
static void | icm2_close_transform (sw_cmm_instance *instance, sw_cmm_transform transform) |
Close a transform previously opened with icm2_open_transform(). More... | |
static sw_cmm_result | icm2_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_api * | icm2_getInstance (void) |
Return the singleton instance of a sw_cmm_api object containing details specific to the ICM2 CMM example module. More... | |
static HqBool | getColorSpaceFromProfile (HPROFILE hProfile, COLORTYPE *pColorSpace) |
Find the color space used by the specified profile. More... | |
static uint32 | getChannelCount (COLORTYPE ctColorSpace) |
Find the number of color channels used in the specified color space. More... | |
static uint32 | getChannelCountFromProfile (HPROFILE hProfile) |
Find the number of color channels used in the specified profile. More... | |
static DWORD | getICMRenderingIntent (int32 nRIPIntent) |
Convert a rendering intent from the CMM API into its ICM2 equivalent. More... | |
static PCOLOR | createTransformBuffer (sw_cmm_instance *instance, uint32 num_pixels) |
Allocate memory to hold COLOR data for the transform process. More... | |
static void | convertFloatToCOLORArray (PCOLOR pOutputArray, COLORTYPE ctColorType, float *pInputArray, uint32 num_pixels) |
Convert an array of floating point pixel values to COLOR equivalents. More... | |
static void | convertCOLORToFloatArray (float *pOutputArray, COLORTYPE ctColorType, PCOLOR pInputArray, uint32 num_pixels) |
Convert an array of COLOR pixel values to floating point equivalents. More... | |
Variables | |
static icm2_implementation | gImplementation |
Singleton instance describing this alternate CMM. | |
CMM Implementation of the interface to the Microsoft's Image Color Management.
#define kDisplayName "Microsoft ICM2" |
UTF-8 CMM name for display.
#define kInternalName "CMM_ICM2" |
Short CMM name for configuration.
typedef struct icm2_implementation icm2_implementation |
A subclass of sw_cmm_api used to store class-private information.
This example module doesn't currently have class specific data, but it does illustrate how to do the sub-classing.
|
static |
Convert an array of COLOR
pixel values to floating point equivalents.
This code is called to reformat pixel data passed between the RIP and ICM2.
pOutputArray | Preallocated memory to hold the output data. |
ctColorType | The type of color value. |
pInputArray | Array of COLOR values to convert. |
num_pixels | The number of pixels to convert. |
|
static |
Convert an array of floating point pixel values to COLOR
equivalents.
This code is called to reformat pixel data passed between the RIP and ICM2.
pOutputArray | Preallocated memory to hold the output data. |
ctColorType | The type of color value. |
pInputArray | Array of float values to convert. |
num_pixels | The number of pixels to convert. |
|
static |
Allocate memory to hold COLOR
data for the transform process.
instance | The alternate CMM instance. |
num_pixels | The number of pixels to be stored in the buffer. |
NULL
on error.
|
static |
Find the number of color channels used in the specified color space.
For example: RGB => 3 channels, CMYK => 4 channels.
ctColorSpace | The Windows color space |
|
static |
Find the number of color channels used in the specified profile.
For example: RGB => 3 channels, CMYK => 4 channels.
hProfile | A profile handle. |
|
static |
Find the color space used by the specified profile.
hProfile | The profile to examine. | |
[in,out] | pColorSpace | Pointer to a COLORTYPE object. |
TRUE
on success, FALSE
otherwise.
|
static |
Convert a rendering intent from the CMM API into its ICM2 equivalent.
As the CMM API supports more rendering intents than ICM2, this is not always a one-to-one mapping.
nRIPIntent | The rendering intent as specified through the CMM API. |