Debian Codegraph @

doc/cctiff.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>cctiff</title>
5 <meta http-equiv="content-type" content="text/html;
6 charset=windows-1252">
7 <meta name="author" content="Graeme Gill">
8 </head>
9 <body>
10 <h2><b>imdi/cctiff</b></h2>
11 <h3>Summary</h3>
12 Color convert a TIFF or JPEG file using a sequence of compatible ICC
13 device profiles, abstract profiles, device link profiles and
14 calibration files. The sequence may be zero length, facilitating
15 format conversion and ICC profile embedding without otherwise
16 altering the pixel values.<br>
17 <h3>Usage<br>
18 </h3>
19 <small><span style="font-family: monospace;"></span> <span
20 style="font-family: monospace;"></span><span style="font-family:
21 monospace;">cctiff [-options] { [-i intent] <span
22 style="font-style: italic;">profile.icm</span> | [-d dir]
23 calibration.cal ...} <span style="font-style: italic;">infile.tif
24
25
26 outfile.tif</span></span></small><small><span
27 style="font-family: monospace;"></span><br style="font-family:
28 monospace;">
29 <span style="font-family: monospace;"></span><span
30 style="font-family: monospace;"></span><br style="font-family:
31 monospace;">
32 <span style="font-family: monospace;">&nbsp;</span><a
33 style="font-family: monospace;" href="#v">-v</a><span
34 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
35 &nbsp;&nbsp;&nbsp;
36
37
38 &nbsp;&nbsp; Verbose</span><br style="font-family: monospace;">
39 <span style="font-family: monospace;">&nbsp;</span><a
40 style="font-family: monospace;" href="#c">-c</a><span
41 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
42 &nbsp;&nbsp;&nbsp;
43
44
45 &nbsp;&nbsp; Combine linearisation curves into one transform</span><br
46 style="font-family: monospace;">
47 <span style="font-family: monospace;">&nbsp;</span><a
48 style="font-family: monospace;" href="#p">-p</a><span
49 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
50 &nbsp;&nbsp;&nbsp;
51
52
53 &nbsp;&nbsp; Use slow precise floating point conversion, rather
54 than fast integer routines.</span><br style="font-family:
55 monospace;">
56 <span style="font-family: monospace;">&nbsp;</span><a
57 style="font-family: monospace;" href="#k">-k</a><span
58 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
59 &nbsp;&nbsp;&nbsp;
60
61
62 &nbsp;&nbsp; Check fast result against precise, and report
63 differences.<br>
64 </span></small><small><span style="font-family: monospace;">&nbsp;</span><a
65 style="font-family: monospace;" href="#r">-r n<span
66 style="font-style: italic;"></span></a><span
67 style="font-family: monospace;">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
68 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override
69 the default CLUT resolution</span></small><small><span
70 style="font-family: monospace;"></span><span style="font-family:
71 monospace;"><br>
72 </span></small><small><span style="font-family: monospace;">&nbsp;</span><a
73 style="font-family: monospace;" href="#t">-t n<span
74 style="font-style: italic;"></span></a><span
75 style="font-family: monospace;">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
76 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Choose
77 output encoding from 1..n<br>
78 &nbsp;<a href="#f">-f [T|J]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
79
80 Set output format to Tiff or Jpeg (Default is same as input)<br>
81 &nbsp;<a href="#q">-q quality</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
82
83 Set JPEG quality 1..100 (Default 80)<br>
84 </span></small><small><span style="font-family: monospace;">&nbsp;</span><a
85 style="font-family: monospace;" href="#a">-a</a><span
86 style="font-family: monospace;">
87 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
88 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Read and Write planes &gt; 4 as
89 alpha planes<br>
90 </span></small><small><span style="font-family: monospace;">&nbsp;<a
91 href="#I">-I</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
92 Ignore
93
94
95 any file or profile colorspace mismatches<br>
96 &nbsp;<a href="#D">-D</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
97 Don't
98
99
100 append or set the output TIFF description<br>
101 &nbsp;<a href="#N">-N</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
102 Output uncompressed TIFF (default LZW)<br>
103 <br>
104 </span></small><small><span style="font-family: monospace;"></span><span
105 style="font-family: monospace;"><br>
106 &nbsp;</span></small><small><a style="font-family: monospace;"
107 href="#e"><i>-e profile.[ic<span style="font-family: monospace;">m
108 | tiff | jpg]</span></i></a><span style="font-family:
109 monospace;"></span></small><small><span style="font-family:
110 monospace;">&nbsp; Optionally embed a profile in the destination
111 TIFF or JPEG file.<br>
112 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
113
114
115 </span></small><small><span style="font-family: monospace;">This
116 may be an ICC file or TIFF or JPEG file with embedded profile.</span></small><br>
117 <small><span style="font-family: monospace;"><br>
118 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
119 Then
120
121
122 for each profile in the linked sequence:<br style="font-family:
123 monospace;">
124 </span></small><small><span style="font-family: monospace;"></span></small><small><span
125 style="font-family: monospace;"></span><span style="font-family:
126 monospace;">&nbsp; </span><a style="font-family: monospace;"
127 href="#i">-i <span style="font-style: italic;">intent</span></a><span
128 style="font-family: monospace;">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
129 &nbsp;&nbsp;&nbsp;&nbsp; Profile intent</span><br
130 style="font-family: monospace;">
131 <span style="font-family: monospace;">&nbsp; &nbsp; &nbsp; &nbsp;
132 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p =
133 perceptual, r = relative colorimetric,</span><br
134 style="font-family: monospace;">
135 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
136 &nbsp;&nbsp;&nbsp;
137
138
139 &nbsp;&nbsp;&nbsp; s = saturation, a = absolute colorimetric<br>
140 </span></small><small><span style="font-family: monospace;">&nbsp;
141 </span><a style="font-family: monospace;" href="#o">-o order<span
142 style="font-style: italic;"></span></a><span
143 style="font-family: monospace;"> &nbsp;&nbsp;&nbsp;&nbsp;
144 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; n = normal (priority: lut
145 &gt; matrix &gt; monochrome)<br>
146 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147 r
148
149
150 = reverse (priority: monochrome &gt; matrix &gt; lut)</span></small><small><span
151 style="font-family: monospace;"></span><br style="font-family:
152 monospace;">
153 <span style="font-family: monospace;">&nbsp; </span><a
154 style="font-family: monospace;" href="#p1"><i>profile.[ic<span
155 style="font-family: monospace;">m | tiff | jpg]</span></i></a><span
156 style="font-family: monospace;">&nbsp; A Device, Link or
157 Abstract profile. This may be an ICC file<br>
158 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
159 (May
160
161
162 be embedded profile in TIFF or JPEG file)<br>
163 </span></small><small><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
164 or
165
166
167 each calibration file in sequence:<br style="font-family:
168 monospace;">
169 </span></small><small><span style="font-family: monospace;"></span></small><small><span
170 style="font-family: monospace;"></span><span style="font-family:
171 monospace;">&nbsp; </span><a style="font-family: monospace;"
172 href="#d">-d <span style="font-style: italic;"><span
173 style="font-family: monospace;">dir</span></span></a><span
174 style="font-family: monospace;">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Calibration direction</span><br
176 style="font-family: monospace;">
177 <span style="font-family: monospace;">&nbsp; &nbsp; &nbsp; &nbsp;
178 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f =
179 forward cal. (default), b = backwards cal.</span><span
180 style="font-family: monospace;"></span><span style="font-family:
181 monospace;"></span></small><small><span style="font-family:
182 monospace;"></span><br style="font-family: monospace;">
183 <span style="font-family: monospace;">&nbsp; </span><a
184 style="font-family: monospace;" href="#p2"><i>calibration.cal<span
185 style="font-family: monospace;"></span></i></a><span
186 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187
188
189 A calibration file.</span></small><br>
190 <small><span style="font-family: monospace;"></span><span
191 style="font-family: monospace;"></span><span style="font-family:
192 monospace;"></span><span style="font-family: monospace;"></span><br>
193 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
194 &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
195 &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
196 &nbsp;&nbsp;&nbsp; Then finally:<br style="font-family:
197 monospace;">
198 &nbsp;<span style="font-family: monospace;"></span><a
199 style="font-family: monospace;" href="#p3"><i>infile.tif</i></a><span
200 style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;
201 &nbsp;&nbsp; A </span><a style="font-family: monospace;"
202 href="File_Formats.html#TIFF">TIFF</a><span style="font-family:
203 monospace;"> or <a href="File_Formats.html#JPEG">JPEG</a>
204 Raster file that will be the input raster to be transformed.</span><br
205 style="font-family: monospace;">
206 &nbsp;<span style="font-family: monospace;"></span><a
207 style="font-family: monospace;" href="#p4"><i>outfile.tif</i></a><span
208 style="font-family: monospace;"> &nbsp;&nbsp;&nbsp;
209 &nbsp;&nbsp;&nbsp; A </span><a style="font-family: monospace;"
210 href="File_Formats.html#TIFF">TIFF</a><span style="font-family:
211 monospace;"> or <a href="File_Formats.html#JPEG">JPEG</a>
212 Raster file created from the input raster, using the given color
213 transform.</span></small><b><br>
214 </b><b><br>
215 Examples</b><br>
216 <br>
217 Convert an RGB file to a CMYK file using perceptual intent:<br>
218 <br>
219 &nbsp;&nbsp;&nbsp; cctiff -ip sRGB.icm -i cmyk.icm rgbinfile.tif
220 cmykoutfile.tif<br>
221 <br>
222 Same as above, but use the source file embedded profile, and embed
223 the resulting colorspace profile in the output:<br>
224 <br>
225 &nbsp;&nbsp;&nbsp; cctiff -e cmyk.icm -ip rgbfile.tif -ip
226 cmyk.icm&nbsp; rgbinfile.tif cmyout.tif<br>
227 <br>
228 Convert a raster file using a device link:<br>
229 <br>
230 &nbsp;&nbsp;&nbsp; cctiff devicelink.icm infile.tif outfile.tif<br>
231 <br>
232 Convert an RGB source to CMYK via an abstract adjustment, and then
233 convert the CMYK to CMYK using a device link, also apply CMYK
234 calibration:<br>
235 <br>
236 &nbsp;&nbsp;&nbsp; cctiff -ir sRGB.icm abstract.icm -ir CMYK.icm
237 devlink.icm CMYKcal.cal infile.tif outfile.tif<br>
238 <br>
239 Convert an RGB source file into a CIELab raster file:<br>
240 <br>
241 &nbsp;&nbsp;&nbsp; cctiff -t1 -ir sRGB.icm rgbfile.tif labfile.tif<br>
242 <h3>Comments<br>
243 </h3>
244 <a name="v"></a> The <span style="font-weight: bold;">-v</span>
245 flag reports extra information about the ICC profile.<br>
246 <br>
247 <a name="c"></a><a name="p"></a><a name="k"></a><a name="r"></a> The
248 <span style="font-weight: bold;">-c</span>, <span
249 style="font-weight: bold;">-p</span>, <span style="font-weight:
250 bold;">-k</span> and <span style="font-weight: bold;">-r</span>
251 options are intended to aid debugging.<br>
252 <br>
253 <a name="t"></a><span style="font-weight: bold;"></span><span
254 style="font-weight: bold;">-t </span>Some colorspaces can be
255 encoded in more than one way. If there is a choice, the choice
256 should be specified the <span style="font-weight: bold;">-t</span>
257 parameter. If this parameter is not given, then cctiff will print
258 the possible choices and choose the default. For TIFF LAB output
259 there are two choices <span style="font-weight: bold;">1</span> for
260 CIELab encoding (Default), and <span style="font-weight: bold;">2</span>
261 for ICCLab encoding. For JPEG RGB output there are two choices: <span
262 style="font-weight: bold;">1</span> for YCbCr encoding with
263 sub-sampled Cb and Cr (Default)\n", and <span style="font-weight:
264 bold;">2</span> RGB encoding which does not use sub sampling. For
265 JPEG CMYK output there are two choices: <span style="font-weight:
266 bold;">1</span> for YCCK encoding with sub-sampled C and C
267 (Default)\n", and <span style="font-weight: bold;">2</span> CMYK
268 encoding which does not use sub sampling<br>
269 <br>
270 <a name="f"></a><span style="font-weight: bold;"></span> <span
271 style="font-weight: bold;">-f</span> By default the output raster
272 file format will be the same as the input, and the <span
273 style="font-weight: bold;">-f</span> parameter will override this.
274 <span style="font-weight: bold;">-f T</span> will select <span
275 style="font-weight: bold;">TIFF</span> format output, and <span
276 style="font-weight: bold;">-f J</span> will select <span
277 style="font-weight: bold;">JPEG</span> format output.<span
278 style="font-weight: bold;"> </span><br>
279 <br>
280 <a name="q"></a><span style="font-weight: bold;"></span> <span
281 style="font-weight: bold;">-q</span> JPEG raster files use lossy
282 compression, and the <span style="font-weight: bold;">-q</span>
283 parameter controls how much compression is used in creating a JPEG
284 output file. The value can be between 1 and 100, with 1 being the
285 lowest quality and highest compression, and 100 being the highest
286 quality and lowest compression. The default value is 80.<br>
287 <br>
288 <a name="a"></a><span style="font-weight: bold;"></span> Normally
289 colorspaces that have more than 4 channels will be read and written
290 as multichannel TIFF files. These are not handled well by all
291 applications, so the <span style="font-weight: bold;">-a</span>
292 option causes extra channels above 4 to be stored as alpha planes,
293 providing more flexibility in using such files.<br>
294 <br>
295 <a name="I"></a>The <span style="font-weight: bold;">-I</span> flag
296 causes any mismatch between the color spaces of the image files and
297 each profile in the sequence to be ignored. The results might be
298 unpredictable unless you know exactly what you are doing.<br>
299 <br>
300 <a name="D"></a>The <span style="font-weight: bold;">-D</span> flag
301 stops the description tag being set or appended to by cctiff.<br>
302 <br>
303 <a name="N"></a>By default any TIFF output file will be LZW
304 compressed, but the <span style="font-weight: bold;">-N</span> flag
305 will cause any TIFF file to be saved uncompressed.<br>
306 <br>
307 <small><a name="e"></a></small><small>The <span style="font-weight:
308 bold;">-e profile.[icm | tiff | jpg]</span> option allows an ICC
309 profile to be embedded in the </small>destination TIFF or JPEG
310 file. The profile may either be an <small>ICC file or a TIFF or
311 JPEG file with embedded profile.</small><br>
312 <br>
313 Following these global options, you should specify the chain of
314 profiles and calibrations you want to apply. Each link of the chain
315 consists of the (optional) intent to be used for device profiles and
316 the filename of the profile, or the optional direction to be used
317 for the calibration and the filename of the calibration. The first
318 profile or calibrations input colorspace must be compatible with the
319 input TIFF file, and each profile or calibration output space must
320 be compatible with the next profile or calibrations input space. An
321 error will result if this is not the case.<br>
322 <br>
323 <div style="margin-left: 40px;"><a name="i"></a>The <span
324 style="font-weight: bold;">-i</span> parameters selects the
325 intent for the following device profile. Normally the same intent
326 should be used for all device profiles, but other combinations
327 allow special uses such as mixed proofing workflows.<br>
328 <br>
329 <a name="o"></a>The <span style="font-weight: bold;">-o</span>
330 parameter changes the order the profiles tags are searched in. A
331 profile is allowed to contain more than the minimum number of
332 elements or table needed to describe a certain transform, and may
333 contain redundant descriptions. &nbsp;By default, lut based table
334 information will be used first if present, followed by
335 matrix/shaper information, and only using monochrome information
336 if it is all that is present. <b>-o r</b> reverses this order. <br>
337 <br>
338 <a name="p1"></a>The file that will be the source of the ICC
339 profile. This can be either an ICC profile or a TIFF or JPEG file
340 that contains an embedded profile. Typically the first profile in
341 the chain might be taken from an embedded profile from the source
342 TIFF or JPEG file.<br>
343 <br>
344 <a name="d"></a>The <span style="font-weight: bold;">-d</span>
345 parameters selects the direction for the following calibration.
346 The default direction is the normal forward calibration, but if
347 -db is used, then a backwards (inverse) calibration will be
348 applied.<br>
349 <br>
350 <a name="p2"></a>The file that will be the source calibration.
351 This will be an Argyll <a href="File_Formats.html#.cal">.cal</a>
352 format file.<span style="font-weight: bold;"></span><br>
353 </div>
354 <br>
355 <a name="p3"></a>The second last argument should be the name of the
356 source TIFF or JPEG file that is to be processed.<br>
357 <br>
358 <a name="p4"></a>The last argument should be the name of the
359 destination TIFF or JPEG file to hold the results.<br>
360 <br>
361 <span style="font-weight: bold;">cctiff</span> uses very fast
362 integer conversion routines to process the raster. Both 8 and 16 bit
363 per component files can be handled, and up to 8 color channels (The
364 limit can be lifted to 15 re-compiling). JPEG files with no more
365 than 8 bit per component can be handled.<br>
366 <br>
367 <br>
368 <br>
369 <br>
370 <br>
371 </body>
372 </html>