summaryrefslogtreecommitdiff
path: root/gs/base/gsicc_cms.h
blob: b5bc42a3b8dcb8ea52214082228abb44566b44b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* Copyright (C) 2001-2011 Artifex Software, Inc.
   All Rights Reserved.

   This software is provided AS-IS with no warranty, either express or
   implied.

   This software is distributed under license and may not be copied, modified
   or distributed except as expressly authorized under the terms of that
   license.  Refer to licensing information at http://www.artifex.com/
   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
*/

/*  Header for the GS interface to littleCMS  */

#ifndef gsicc_littlecms_INCLUDED
#  define gsicc_littlecms_INCLUDED

#include "gxcvalue.h"
#include "gscms.h"

#ifndef cmm_gcmmhprofile_DEFINED
    #define cmm_gcmmhprofile_DEFINED
    typedef void* gcmmhprofile_t;
#endif

#ifndef cmm_gcmmhlink_DEFINED
    #define cmm_gcmmhlink_DEFINED
    typedef void* gcmmhlink_t;
#endif

/* Prototypes */

gcmmhprofile_t gscms_get_profile_handle_mem(unsigned char *buffer,
                                            unsigned int input_size);
gcmmhprofile_t gscms_get_profile_handle_file(const char *filename);
void gscms_transform_color_buffer(gsicc_link_t *icclink,
                                  gsicc_bufferdesc_t *input_buff_desc,
                             gsicc_bufferdesc_t *output_buff_desc,
                             void *inputbuffer,
                             void *outputbuffer);
int gscms_get_channel_count(gcmmhprofile_t profile);
int gscms_get_pcs_channel_count(gcmmhprofile_t profile);
char* gscms_get_clrtname(gcmmhprofile_t profile, int colorcount);
int gscms_get_numberclrtnames(gcmmhprofile_t profile);
gsicc_colorbuffer_t gscms_get_profile_data_space(gcmmhprofile_t profile);
void gscms_transform_color(gsicc_link_t *icclink,
                             void *inputcolor,
                             void *outputcolor,
                             int num_bytes,
                             void **contextptr);
gcmmhlink_t gscms_get_link(gcmmhprofile_t  lcms_srchandle,
                    gcmmhprofile_t lcms_deshandle,
                    gsicc_rendering_param_t *rendering_params);
gcmmhlink_t gscms_get_link_proof(gcmmhprofile_t  lcms_srchandle,
                    gcmmhprofile_t lcms_deshandle,
                    gcmmhprofile_t lcms_proofhandle,
                    gsicc_rendering_param_t *rendering_params);
void gscms_create(void **contextptr);
void gscms_destroy(void **contextptr);
void gscms_release_link(gsicc_link_t *icclink);
void gscms_release_profile(void *profile);
int gscms_transform_named_color(gsicc_link_t *icclink,  float tint_value,
                                const char* ColorName,
                        gx_color_value device_values[] );
void gscms_get_name2device_link(gsicc_link_t *icclink, gcmmhprofile_t  lcms_srchandle,
                    gcmmhprofile_t lcms_deshandle, gcmmhprofile_t lcms_proofhandle,
                    gsicc_rendering_param_t *rendering_params);
int gscms_get_input_channel_count(gcmmhprofile_t profile);
int gscms_get_output_channel_count(gcmmhprofile_t profile);

#endif