1 #ifndef PROF_H
2 #define PROF_H
3 /*
4  * ICC Profile creation library.
5  *
6  * Author:  Graeme W. Gill
7  * Date:    11/10/00
8  * Version: 1.00
9  *
10  * Copyright 2000 Graeme W. Gill
11  * All rights reserved.
12  *
13  * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :-
14  * see the License.txt file for licencing details.
15  */
16 
17 /*
18  * This library provide high level routines to create device ICC
19  * profiles from argyll cgats patch test data.
20  */
21 
22 
23 /* Profile algorithm type */
24 typedef enum {
25 	prof_default          = 0,		/* Default for type of device */
26 	prof_clutLab          = 1,		/* Lab clut. */
27 	prof_clutXYZ          = 2,		/* XYZ clut. */
28 	prof_gammat           = 3,		/* XYZ gamut + matrix */
29 	prof_shamat           = 4,		/* XYZ shaper + matrix */
30 	prof_gam1mat          = 5,		/* XYZ shared TRC gamut + matrix */
31 	prof_sha1mat          = 6,		/* XYZ shared TRC shaper + matrix */
32 	prof_matonly          = 7		/* XYZ matrix, linear */
33 } prof_atype;
34 
35 /* Output or Display device */
36 void make_output_icc(
37 	prof_atype ptype,		/* Profile output type */
38 	int mtxtoo,				/* NZ if matrix tags should be created for Display XYZ cLUT */
39 	icmICCVersion iccver,	/* ICC profile version to create */
40 	int verb,				/* Vebosity level, 0 = none */
41 	int iquality,			/* A2B table quality, 0..2 */
42 	int oquality,			/* B2A table quality, 0..2 */
43 	int noiluts,			/* nz to supress creation of input (Device) shaper luts */
44 	int noisluts,			/* nz to supress creation of input sub-grid (Device) shaper luts */
45 	int nooluts,			/* nz to supress creation of output (PCS) shaper luts */
46 	int nocied,				/* nz to supress inclusion of .ti3 data in profile */
47 	int noptop,				/* nz to use colorimetic source gamut to make perceptual table */
48 	int nostos,				/* nz to use colorimetic source gamut to make perceptual table */
49 	int gamdiag,			/* Make gamut mapping diagnostic wrl plots */
50 	int verify,				/* nz to print verification */
51 	int clipprims,			/* Clip white, black and primaries */
52 	double wpscale,			/* >= 0.0 for media white point scale factor */
53 //	double *bpo,			/* != NULL for XYZ black point override */
54 	icxInk *ink,			/* Ink limit/black generation setup */
55 	char *in_name,			/* input .ti3 file name */
56 	char *file_name,		/* output icc name */
57 	cgats *icg,				/* input cgats structure */
58 	int spec,				/* Use spectral data flag */
59 	icxIllumeType tillum,	/* Target/simulated instrument illuminant, if set. */
60 	xspect *cust_tillum,	/* Custom target/simulated illumination spectrum */
61 	                        /* if tillum == icxIT_custom */
62 	icxIllumeType illum,	/* CIE calc. illuminant spectrum, and FWA inst. */
63 							/* illuminant if tillum not set. */
64 	xspect *cust_illum,		/* Custom CIE illumination spectrum if illum == icxIT_custom */
65 	icxObserverType observ,	/* CIE calc. observer */
66 	int fwacomp,			/* FWA compensation requested */
67 	double smooth,			/* RSPL smoothing factor, -ve if raw */
68 	double avgdev,			/* reading Average Deviation as a proportion of the input range */
69 	double demph,			/* Emphasise dark region grid resolution in cLUT */
70 	int gcompr,				/* Gamut compression % if > 0 rather than ipname */
71 	int gexpr,				/* Gamut saturation expansion % if gcompr > 0 rather */
72 	char *ipname,			/* input icc profile - enables gamut map, NULL if none */
73 	char *sgname,			/* source image gamut - NULL if none */
74 	char *absname[3],		/* abstract profile name for each table */
75 							/* may be duplicated, NULL if none */
76 	int sepsat,				/* Create separate Saturation B2A */
77 	icxViewCond *ivc_p,		/* Input Viewing Parameters for CIECAM97s */
78 	icxViewCond *ovc_p,		/* Output Viewing Parameters for CIECAM97s (enables CAM clip) */
79 	int ivc_e,				/* Input Enumerated viewing condition */
80 	int ovc_e,				/* Output Enumerated viewing condition */
81 	icxGMappingIntent *pgmi,/* Perceptual gamut mapping intent */
82 	icxGMappingIntent *sgmi,/* Saturation gamut mapping intent */
83 	profxinf *pi			/* Optional Profile creation extra data */
84 );
85 
86 /* Input device */
87 void make_input_icc(
88 	prof_atype ptype,		/* Profile algorithm type */
89 	icmICCVersion iccver,	/* ICC profile version to create */
90 	int verb,
91 	int iquality,			/* A2B table quality, 0..3 */
92 	int oquality,			/* B2A table quality, 0..3 */
93 	int noisluts,			/* nz to supress creation of input (Device) shaper luts */
94 	int noipluts,			/* nz to supress creation of input (Device) position luts */
95 	int nooluts,			/* nz to supress creation of output (PCS) shaper luts */
96 	int nocied,				/* nz to supress inclusion of .ti3 data in profile */
97 	int verify,
98 	int autowpsc,			/* nz for Auto scale the WP to prevent clipping above WP patch */
99 	int clipovwp,			/* nz for Clip cLUT values above WP */
100 	double wpscale,			/* >= 0.0 for media white point scale factor */
101 	int dob2a,				/* nz to create a B2A table as well */
102 	int extrap,				/* nz to create extra cLUT interpolation points */
103 	int clipprims,			/* Clip white, black and primaries */
104 	char *in_name,			/* input .ti3 file name */
105 	char *file_name,		/* output icc name */
106 	cgats *icg,				/* input cgats structure */
107 	int emis,				/* emissive reference data */
108 	int spec,				/* Use spectral data flag */
109 	icxIllumeType illum,	/* Spectral illuminant */
110 	xspect *cust_illum,		/* Possible custom illumination */
111 	icxObserverType observ,	/* Spectral observer */
112 	double smooth,			/* RSPL smoothing factor, -ve if raw */
113 	double avgdev,			/* reading Average Deviation as a proportion of the input range */
114 	profxinf *xpi			/* Optional Profile creation extra data */
115 );
116 
117 #endif /* PROF_H */
118