]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/api-driver.html
Merge changes from CUPS 1.4svn-r8659
[thirdparty/cups.git] / doc / help / api-driver.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- SECTION: Programming -->
4 <head>
5 <title>Printer Driver API</title>
6 <meta name="keywords" content="Programming">
7 <meta name="creator" content="Mini-XML v2.6">
8 <style type="text/css"><!--
9 BODY {
10 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
11 }
12
13 H1, H2, H3, H4, H5, H6, P, TD, TH {
14 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
15 }
16
17 KBD {
18 font-family: monaco, courier, monospace;
19 font-weight: bold;
20 }
21
22 PRE {
23 font-family: monaco, courier, monospace;
24 }
25
26 PRE.command {
27 margin-left: 36pt;
28 }
29
30 P.compact {
31 margin: 0;
32 }
33
34 P.example {
35 font-style: italic;
36 margin-left: 36pt;
37 }
38
39 PRE.example {
40 background: #eeeeee;
41 border: dotted thin #999999;
42 margin-left: 36pt;
43 padding: 10pt;
44 }
45
46 PRE.command EM, PRE.example EM {
47 font-family: lucida grande, geneva, helvetica, arial, sans-serif;
48 }
49
50 P.command {
51 font-family: monaco, courier, monospace;
52 margin-left: 36pt;
53 }
54
55 P.formula {
56 font-style: italic;
57 margin-left: 36pt;
58 }
59
60 BLOCKQUOTE {
61 background: #eeeeee;
62 border: solid thin #999999;
63 padding: 10pt;
64 }
65
66 A IMG {
67 border: none;
68 }
69
70 A:link:hover IMG {
71 background: #f0f0f0;
72 border-radius: 10px;
73 -moz-border-radius: 10px;
74 }
75
76 A:link, A:visited {
77 font-weight: normal;
78 text-decoration: none;
79 }
80
81 A:link:hover, A:visited:hover, A:active {
82 text-decoration: underline;
83 }
84
85 SUB, SUP {
86 font-size: 50%;
87 }
88
89 TR.data, TD.data, TR.data TD {
90 margin-top: 10pt;
91 padding: 5pt;
92 border-bottom: solid 1pt #999999;
93 }
94
95 TR.data TH {
96 border-bottom: solid 1pt #999999;
97 padding-top: 10pt;
98 padding-left: 5pt;
99 text-align: left;
100 }
101
102 DIV.table TABLE {
103 border: solid thin #999999;
104 border-collapse: collapse;
105 border-spacing: 0;
106 margin-left: auto;
107 margin-right: auto;
108 }
109
110 DIV.table CAPTION {
111 caption-side: top;
112 font-size: 120%;
113 font-style: italic;
114 font-weight: bold;
115 margin-left: auto;
116 margin-right: auto;
117 }
118
119 DIV.table TABLE TD {
120 border: solid thin #cccccc;
121 padding-top: 5pt;
122 }
123
124 DIV.table TABLE TH {
125 background: #cccccc;
126 border: none;
127 border-bottom: solid thin #999999;
128 }
129
130 DIV.figure TABLE {
131 margin-left: auto;
132 margin-right: auto;
133 }
134
135 DIV.figure CAPTION {
136 caption-side: bottom;
137 font-size: 120%;
138 font-style: italic;
139 font-weight: bold;
140 margin-left: auto;
141 margin-right: auto;
142 }
143
144 TH.label {
145 text-align: right;
146 vertical-align: top;
147 }
148
149 TH.sublabel {
150 text-align: right;
151 font-weight: normal;
152 }
153
154 HR {
155 border: solid thin;
156 }
157
158 SPAN.info {
159 background: black;
160 border: thin solid black;
161 color: white;
162 font-size: 80%;
163 font-style: italic;
164 font-weight: bold;
165 white-space: nowrap;
166 }
167
168 H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
169 float: right;
170 font-size: 100%;
171 }
172
173 H1.title {
174 }
175
176 H2.title, H3.title {
177 border-bottom: solid 2pt #000000;
178 }
179
180 DIV.indent, TABLE.indent {
181 margin-top: 2em;
182 margin-left: auto;
183 margin-right: auto;
184 width: 90%;
185 }
186
187 TABLE.indent {
188 border-collapse: collapse;
189 }
190
191 TABLE.indent TD, TABLE.indent TH {
192 padding: 0;
193 }
194
195 TABLE.list {
196 border-collapse: collapse;
197 margin-left: auto;
198 margin-right: auto;
199 width: 90%;
200 }
201
202 TABLE.list TH {
203 background: white;
204 border-bottom: solid thin #cccccc;
205 color: #444444;
206 padding-top: 10pt;
207 padding-left: 5pt;
208 text-align: left;
209 vertical-align: bottom;
210 white-space: nowrap;
211 }
212
213 TABLE.list TH A {
214 color: #4444cc;
215 }
216
217 TABLE.list TD {
218 border-bottom: solid thin #eeeeee;
219 padding-top: 5pt;
220 padding-left: 5pt;
221 }
222
223 TABLE.list TR:nth-child(even) {
224 background: #f8f8f8;
225 }
226
227 TABLE.list TR:nth-child(odd) {
228 background: #f4f4f4;
229 }
230
231 DT {
232 margin-left: 36pt;
233 margin-top: 12pt;
234 }
235
236 DD {
237 margin-left: 54pt;
238 }
239
240 DL.category DT {
241 font-weight: bold;
242 }
243
244 P.summary {
245 margin-left: 36pt;
246 font-family: monaco, courier, monospace;
247 }
248
249 DIV.summary TABLE {
250 border: solid thin #999999;
251 border-collapse: collapse;
252 border-spacing: 0;
253 margin: 10px;
254 }
255
256 DIV.summary TABLE TD, DIV.summary TABLE TH {
257 border: solid thin #999999;
258 padding: 5px;
259 text-align: left;
260 vertical-align: top;
261 }
262
263 DIV.summary TABLE THEAD TH {
264 background: #eeeeee;
265 }
266
267 /* API documentation styles... */
268 div.body h1 {
269 margin: 0;
270 }
271 div.body h2 {
272 margin-top: 1.5em;
273 }
274 div.body h3, div.body h4, div.body h5 {
275 margin-bottom: 0.5em;
276 margin-top: 1.5em;
277 }
278 .class, .enumeration, .function, .struct, .typedef, .union {
279 border-bottom: solid thin #999999;
280 margin-bottom: 0;
281 margin-top: 2em;
282 }
283 .description {
284 margin-top: 0.5em;
285 }
286 code, p.code, pre, ul.code li {
287 font-family: monaco, courier, monospace;
288 font-size: 90%;
289 }
290 ul.code, ul.contents, ul.subcontents {
291 list-style-type: none;
292 margin: 0;
293 padding-left: 0;
294 }
295 ul.code li {
296 margin: 0;
297 }
298 ul.contents > li {
299 margin-top: 1em;
300 }
301 ul.contents li ul.code, ul.contents li ul.subcontents {
302 padding-left: 2em;
303 }
304 div.body dl {
305 margin-left: 0;
306 margin-top: 0;
307 }
308 div.body dt {
309 font-style: italic;
310 margin-left: 0;
311 margin-top: 0;
312 }
313 div.body dd {
314 margin-bottom: 0.5em;
315 }
316
317 /* This is just for the HTML files generated with the framedhelp target */
318 div.contents {
319 background: #e8e8e8;
320 border: solid thin black;
321 padding: 10px;
322 }
323 div.contents h1 {
324 font-size: 110%;
325 }
326 div.contents h2 {
327 font-size: 100%;
328 }
329 div.contents ul.contents {
330 font-size: 80%;
331 }
332 div.contents ul.subcontents li {
333 margin-left: 1em;
334 text-indent: -1em;
335 }
336 --></style>
337 </head>
338 <body>
339 <div class='body'>
340 <!--
341 "$Id$"
342
343 Driver API header for CUPS.
344
345 Copyright 2009 by Apple Inc.
346
347 These coded instructions, statements, and computer programs are the
348 property of Apple Inc. and are protected by Federal copyright
349 law. Distribution and use rights are outlined in the file "LICENSE.txt"
350 which should have been included with this file. If this file is
351 file is missing or damaged, see the license at "http://www.cups.org/".
352 -->
353
354 <h1 class='title'>Driver API</h1>
355
356 <div class='summary'><table summary='General Information'>
357 <thead>
358 <tr>
359 <th>Header</th>
360 <th>cups/driver.h</th>
361 </tr>
362 </thead>
363 <tbody>
364 <tr>
365 <th>Library</th>
366 <td>-lcupsdriver</td>
367 </tr>
368 <tr>
369 <th>See Also</th>
370 <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
371 </tr>
372 </tbody>
373 </table></div>
374 <h2 class="title">Contents</h2>
375 <ul class="contents">
376 <ul class="subcontents">
377 <li><a href="#OVERVIEW">Overview</a></li>
378 <li><a href="#FUNCTIONS">Functions</a><ul class="code">
379 <li><a href="#cupsCMYKDelete" title="Delete a color separation.">cupsCMYKDelete</a></li>
380 <li><a href="#cupsCMYKDoBlack" title="Do a black separation...">cupsCMYKDoBlack</a></li>
381 <li><a href="#cupsCMYKDoCMYK" title="Do a CMYK separation...">cupsCMYKDoCMYK</a></li>
382 <li><a href="#cupsCMYKDoGray" title="Do a grayscale separation...">cupsCMYKDoGray</a></li>
383 <li><a href="#cupsCMYKDoRGB" title="Do an sRGB separation...">cupsCMYKDoRGB</a></li>
384 <li><a href="#cupsCMYKLoad" title="Load a CMYK color profile from PPD attributes.">cupsCMYKLoad</a></li>
385 <li><a href="#cupsCMYKNew" title="Create a new CMYK color separation.">cupsCMYKNew</a></li>
386 <li><a href="#cupsCMYKSetBlack" title="Set the transition range for CMY to black.">cupsCMYKSetBlack</a></li>
387 <li><a href="#cupsCMYKSetCurve" title="Set a color transform curve using points.">cupsCMYKSetCurve</a></li>
388 <li><a href="#cupsCMYKSetGamma" title="Set a color transform curve using gamma and density.">cupsCMYKSetGamma</a></li>
389 <li><a href="#cupsCMYKSetInkLimit" title="Set the limit on the amount of ink.">cupsCMYKSetInkLimit</a></li>
390 <li><a href="#cupsCMYKSetLtDk" title="Set light/dark ink transforms.">cupsCMYKSetLtDk</a></li>
391 <li><a href="#cupsCheckBytes" title="Check to see if all bytes are zero.">cupsCheckBytes</a></li>
392 <li><a href="#cupsCheckValue" title="Check to see if all bytes match the given value.">cupsCheckValue</a></li>
393 <li><a href="#cupsDitherDelete" title="Free a dithering buffer.">cupsDitherDelete</a></li>
394 <li><a href="#cupsDitherLine" title="Dither a line of pixels...">cupsDitherLine</a></li>
395 <li><a href="#cupsDitherNew" title="Create an error-diffusion dithering buffer.">cupsDitherNew</a></li>
396 <li><a href="#cupsFindAttr" title="Find a PPD attribute based on the colormodel,
397 media, and resolution.">cupsFindAttr</a></li>
398 <li><a href="#cupsLutDelete" title="Free the memory used by a lookup table.">cupsLutDelete</a></li>
399 <li><a href="#cupsLutLoad" title="Load a LUT from a PPD file.">cupsLutLoad</a></li>
400 <li><a href="#cupsLutNew" title="Make a lookup table from a list of pixel values.">cupsLutNew</a></li>
401 <li><a href="#cupsPackHorizontal" title="Pack pixels horizontally...">cupsPackHorizontal</a></li>
402 <li><a href="#cupsPackHorizontal2" title="Pack 2-bit pixels horizontally...">cupsPackHorizontal2</a></li>
403 <li><a href="#cupsPackHorizontalBit" title="Pack pixels horizontally by bit...">cupsPackHorizontalBit</a></li>
404 <li><a href="#cupsPackVertical" title="Pack pixels vertically...">cupsPackVertical</a></li>
405 <li><a href="#cupsRGBDelete" title="Delete a color separation.">cupsRGBDelete</a></li>
406 <li><a href="#cupsRGBDoGray" title="Do a grayscale separation...">cupsRGBDoGray</a></li>
407 <li><a href="#cupsRGBDoRGB" title="Do a RGB separation...">cupsRGBDoRGB</a></li>
408 <li><a href="#cupsRGBLoad" title="Load a RGB color profile from a PPD file.">cupsRGBLoad</a></li>
409 <li><a href="#cupsRGBNew" title="Create a new RGB color separation.">cupsRGBNew</a></li>
410 </ul></li>
411 <li><a href="#TYPES">Data Types</a><ul class="code">
412 <li><a href="#cups_cmyk_t" title="Simple CMYK lookup table">cups_cmyk_t</a></li>
413 <li><a href="#cups_dither_t" title="Dithering State">cups_dither_t</a></li>
414 <li><a href="#cups_lut_t" title="Lookup Table for Dithering">cups_lut_t</a></li>
415 <li><a href="#cups_rgb_t" title="Color separation lookup table">cups_rgb_t</a></li>
416 <li><a href="#cups_sample_t" title="Color sample point">cups_sample_t</a></li>
417 </ul></li>
418 <li><a href="#STRUCTURES">Structures</a><ul class="code">
419 <li><a href="#cups_cmyk_s" title="Simple CMYK lookup table">cups_cmyk_s</a></li>
420 <li><a href="#cups_dither_s" title="Dithering State">cups_dither_s</a></li>
421 <li><a href="#cups_lut_s" title="Lookup Table for Dithering">cups_lut_s</a></li>
422 <li><a href="#cups_rgb_s" title="Color separation lookup table">cups_rgb_s</a></li>
423 <li><a href="#cups_sample_s" title="Color sample point">cups_sample_s</a></li>
424 </ul></li>
425 <li><a href="#VARIABLES">Variables</a><ul class="code">
426 <li><a href="#cups_scmy_lut[256]" title="sRGB gamma lookup table (inverted)">cups_scmy_lut[256]</a></li>
427 <li><a href="#cups_srgb_lut[256]" title="sRGB gamma lookup table">cups_srgb_lut[256]</a></li>
428 </ul></li>
429 <!--
430 "$Id$"
431
432 Driver API introduction for CUPS.
433
434 Copyright 2009 by Apple Inc.
435
436 These coded instructions, statements, and computer programs are the
437 property of Apple Inc. and are protected by Federal copyright
438 law. Distribution and use rights are outlined in the file "LICENSE.txt"
439 which should have been included with this file. If this file is
440 file is missing or damaged, see the license at "http://www.cups.org/".
441 -->
442
443 <h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
444
445 <p>The driver API provides common dithering, color conversion, and utility
446 functions for CUPS drivers.</p>
447 <h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
448 <h3 class="function"><a name="cupsCMYKDelete">cupsCMYKDelete</a></h3>
449 <p class="description">Delete a color separation.</p>
450 <p class="code">
451 void cupsCMYKDelete (<br>
452 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk<br>
453 );</p>
454 <h4 class="parameters">Parameters</h4>
455 <dl>
456 <dt>cmyk</dt>
457 <dd class="description">Color separation</dd>
458 </dl>
459 <h3 class="function"><a name="cupsCMYKDoBlack">cupsCMYKDoBlack</a></h3>
460 <p class="description">Do a black separation...</p>
461 <p class="code">
462 void cupsCMYKDoBlack (<br>
463 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
464 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
465 &nbsp;&nbsp;&nbsp;&nbsp;short *output,<br>
466 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
467 );</p>
468 <h4 class="parameters">Parameters</h4>
469 <dl>
470 <dt>cmyk</dt>
471 <dd class="description">Color separation</dd>
472 <dt>input</dt>
473 <dd class="description">Input grayscale pixels</dd>
474 <dt>output</dt>
475 <dd class="description">Output Device-N pixels</dd>
476 <dt>num_pixels</dt>
477 <dd class="description">Number of pixels</dd>
478 </dl>
479 <h3 class="function"><a name="cupsCMYKDoCMYK">cupsCMYKDoCMYK</a></h3>
480 <p class="description">Do a CMYK separation...</p>
481 <p class="code">
482 void cupsCMYKDoCMYK (<br>
483 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
484 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
485 &nbsp;&nbsp;&nbsp;&nbsp;short *output,<br>
486 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
487 );</p>
488 <h4 class="parameters">Parameters</h4>
489 <dl>
490 <dt>cmyk</dt>
491 <dd class="description">Color separation</dd>
492 <dt>input</dt>
493 <dd class="description">Input grayscale pixels</dd>
494 <dt>output</dt>
495 <dd class="description">Output Device-N pixels</dd>
496 <dt>num_pixels</dt>
497 <dd class="description">Number of pixels</dd>
498 </dl>
499 <h3 class="function"><a name="cupsCMYKDoGray">cupsCMYKDoGray</a></h3>
500 <p class="description">Do a grayscale separation...</p>
501 <p class="code">
502 void cupsCMYKDoGray (<br>
503 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
504 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
505 &nbsp;&nbsp;&nbsp;&nbsp;short *output,<br>
506 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
507 );</p>
508 <h4 class="parameters">Parameters</h4>
509 <dl>
510 <dt>cmyk</dt>
511 <dd class="description">Color separation</dd>
512 <dt>input</dt>
513 <dd class="description">Input grayscale pixels</dd>
514 <dt>output</dt>
515 <dd class="description">Output Device-N pixels</dd>
516 <dt>num_pixels</dt>
517 <dd class="description">Number of pixels</dd>
518 </dl>
519 <h3 class="function"><a name="cupsCMYKDoRGB">cupsCMYKDoRGB</a></h3>
520 <p class="description">Do an sRGB separation...</p>
521 <p class="code">
522 void cupsCMYKDoRGB (<br>
523 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
524 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
525 &nbsp;&nbsp;&nbsp;&nbsp;short *output,<br>
526 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
527 );</p>
528 <h4 class="parameters">Parameters</h4>
529 <dl>
530 <dt>cmyk</dt>
531 <dd class="description">Color separation</dd>
532 <dt>input</dt>
533 <dd class="description">Input grayscale pixels</dd>
534 <dt>output</dt>
535 <dd class="description">Output Device-N pixels</dd>
536 <dt>num_pixels</dt>
537 <dd class="description">Number of pixels</dd>
538 </dl>
539 <h3 class="function"><a name="cupsCMYKLoad">cupsCMYKLoad</a></h3>
540 <p class="description">Load a CMYK color profile from PPD attributes.</p>
541 <p class="code">
542 <a href="#cups_cmyk_t">cups_cmyk_t</a> *cupsCMYKLoad (<br>
543 &nbsp;&nbsp;&nbsp;&nbsp;ppd_file_t *ppd,<br>
544 &nbsp;&nbsp;&nbsp;&nbsp;const char *colormodel,<br>
545 &nbsp;&nbsp;&nbsp;&nbsp;const char *media,<br>
546 &nbsp;&nbsp;&nbsp;&nbsp;const char *resolution<br>
547 );</p>
548 <h4 class="parameters">Parameters</h4>
549 <dl>
550 <dt>ppd</dt>
551 <dd class="description">PPD file</dd>
552 <dt>colormodel</dt>
553 <dd class="description">ColorModel value</dd>
554 <dt>media</dt>
555 <dd class="description">MediaType value</dd>
556 <dt>resolution</dt>
557 <dd class="description">Resolution value</dd>
558 </dl>
559 <h4 class="returnvalue">Return Value</h4>
560 <p class="description">CMYK color separation</p>
561 <h3 class="function"><a name="cupsCMYKNew">cupsCMYKNew</a></h3>
562 <p class="description">Create a new CMYK color separation.</p>
563 <p class="code">
564 <a href="#cups_cmyk_t">cups_cmyk_t</a> *cupsCMYKNew (<br>
565 &nbsp;&nbsp;&nbsp;&nbsp;int num_channels<br>
566 );</p>
567 <h4 class="parameters">Parameters</h4>
568 <dl>
569 <dt>num_channels</dt>
570 <dd class="description">Number of color components</dd>
571 </dl>
572 <h4 class="returnvalue">Return Value</h4>
573 <p class="description">New CMYK separation or NULL</p>
574 <h3 class="function"><a name="cupsCMYKSetBlack">cupsCMYKSetBlack</a></h3>
575 <p class="description">Set the transition range for CMY to black.</p>
576 <p class="code">
577 void cupsCMYKSetBlack (<br>
578 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
579 &nbsp;&nbsp;&nbsp;&nbsp;float lower,<br>
580 &nbsp;&nbsp;&nbsp;&nbsp;float upper<br>
581 );</p>
582 <h4 class="parameters">Parameters</h4>
583 <dl>
584 <dt>cmyk</dt>
585 <dd class="description">CMYK color separation</dd>
586 <dt>lower</dt>
587 <dd class="description">No black ink</dd>
588 <dt>upper</dt>
589 <dd class="description">Only black ink</dd>
590 </dl>
591 <h3 class="function"><a name="cupsCMYKSetCurve">cupsCMYKSetCurve</a></h3>
592 <p class="description">Set a color transform curve using points.</p>
593 <p class="code">
594 void cupsCMYKSetCurve (<br>
595 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
596 &nbsp;&nbsp;&nbsp;&nbsp;int channel,<br>
597 &nbsp;&nbsp;&nbsp;&nbsp;int num_xypoints,<br>
598 &nbsp;&nbsp;&nbsp;&nbsp;const float *xypoints<br>
599 );</p>
600 <h4 class="parameters">Parameters</h4>
601 <dl>
602 <dt>cmyk</dt>
603 <dd class="description">CMYK color separation</dd>
604 <dt>channel</dt>
605 <dd class="description">Color channel</dd>
606 <dt>num_xypoints</dt>
607 <dd class="description">Number of X,Y points</dd>
608 <dt>xypoints</dt>
609 <dd class="description">X,Y points</dd>
610 </dl>
611 <h3 class="function"><a name="cupsCMYKSetGamma">cupsCMYKSetGamma</a></h3>
612 <p class="description">Set a color transform curve using gamma and density.</p>
613 <p class="code">
614 void cupsCMYKSetGamma (<br>
615 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
616 &nbsp;&nbsp;&nbsp;&nbsp;int channel,<br>
617 &nbsp;&nbsp;&nbsp;&nbsp;float gamval,<br>
618 &nbsp;&nbsp;&nbsp;&nbsp;float density<br>
619 );</p>
620 <h4 class="parameters">Parameters</h4>
621 <dl>
622 <dt>cmyk</dt>
623 <dd class="description">CMYK color separation</dd>
624 <dt>channel</dt>
625 <dd class="description">Ink channel</dd>
626 <dt>gamval</dt>
627 <dd class="description">Gamma correction</dd>
628 <dt>density</dt>
629 <dd class="description">Maximum density</dd>
630 </dl>
631 <h3 class="function"><a name="cupsCMYKSetInkLimit">cupsCMYKSetInkLimit</a></h3>
632 <p class="description">Set the limit on the amount of ink.</p>
633 <p class="code">
634 void cupsCMYKSetInkLimit (<br>
635 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
636 &nbsp;&nbsp;&nbsp;&nbsp;float limit<br>
637 );</p>
638 <h4 class="parameters">Parameters</h4>
639 <dl>
640 <dt>cmyk</dt>
641 <dd class="description">CMYK color separation</dd>
642 <dt>limit</dt>
643 <dd class="description">Limit of ink</dd>
644 </dl>
645 <h3 class="function"><a name="cupsCMYKSetLtDk">cupsCMYKSetLtDk</a></h3>
646 <p class="description">Set light/dark ink transforms.</p>
647 <p class="code">
648 void cupsCMYKSetLtDk (<br>
649 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_cmyk_t">cups_cmyk_t</a> *cmyk,<br>
650 &nbsp;&nbsp;&nbsp;&nbsp;int channel,<br>
651 &nbsp;&nbsp;&nbsp;&nbsp;float light,<br>
652 &nbsp;&nbsp;&nbsp;&nbsp;float dark<br>
653 );</p>
654 <h4 class="parameters">Parameters</h4>
655 <dl>
656 <dt>cmyk</dt>
657 <dd class="description">CMYK color separation</dd>
658 <dt>channel</dt>
659 <dd class="description">Dark ink channel (+1 for light)</dd>
660 <dt>light</dt>
661 <dd class="description">Light ink only level</dd>
662 <dt>dark</dt>
663 <dd class="description">Dark ink only level</dd>
664 </dl>
665 <h3 class="function"><a name="cupsCheckBytes">cupsCheckBytes</a></h3>
666 <p class="description">Check to see if all bytes are zero.</p>
667 <p class="code">
668 int cupsCheckBytes (<br>
669 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *bytes,<br>
670 &nbsp;&nbsp;&nbsp;&nbsp;int length<br>
671 );</p>
672 <h4 class="parameters">Parameters</h4>
673 <dl>
674 <dt>bytes</dt>
675 <dd class="description">Bytes to check</dd>
676 <dt>length</dt>
677 <dd class="description">Number of bytes to check</dd>
678 </dl>
679 <h4 class="returnvalue">Return Value</h4>
680 <p class="description">1 if they match</p>
681 <h3 class="function"><a name="cupsCheckValue">cupsCheckValue</a></h3>
682 <p class="description">Check to see if all bytes match the given value.</p>
683 <p class="code">
684 int cupsCheckValue (<br>
685 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *bytes,<br>
686 &nbsp;&nbsp;&nbsp;&nbsp;int length,<br>
687 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char value<br>
688 );</p>
689 <h4 class="parameters">Parameters</h4>
690 <dl>
691 <dt>bytes</dt>
692 <dd class="description">Bytes to check</dd>
693 <dt>length</dt>
694 <dd class="description">Number of bytes to check</dd>
695 <dt>value</dt>
696 <dd class="description">Value to check</dd>
697 </dl>
698 <h4 class="returnvalue">Return Value</h4>
699 <p class="description">1 if they match</p>
700 <h3 class="function"><a name="cupsDitherDelete">cupsDitherDelete</a></h3>
701 <p class="description">Free a dithering buffer.</p>
702 <p class="code">
703 void cupsDitherDelete (<br>
704 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_dither_t">cups_dither_t</a> *d<br>
705 );</p>
706 <h4 class="parameters">Parameters</h4>
707 <dl>
708 <dt>d</dt>
709 <dd class="description">Dithering buffer</dd>
710 </dl>
711 <h4 class="discussion">Discussion</h4>
712 <p class="discussion">Returns 0 on success, -1 on failure.</p>
713 <h3 class="function"><a name="cupsDitherLine">cupsDitherLine</a></h3>
714 <p class="description">Dither a line of pixels...</p>
715 <p class="code">
716 void cupsDitherLine (<br>
717 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_dither_t">cups_dither_t</a> *d,<br>
718 &nbsp;&nbsp;&nbsp;&nbsp;const <a href="#cups_lut_t">cups_lut_t</a> *lut,<br>
719 &nbsp;&nbsp;&nbsp;&nbsp;const short *data,<br>
720 &nbsp;&nbsp;&nbsp;&nbsp;int num_channels,<br>
721 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *p<br>
722 );</p>
723 <h4 class="parameters">Parameters</h4>
724 <dl>
725 <dt>d</dt>
726 <dd class="description">Dither data</dd>
727 <dt>lut</dt>
728 <dd class="description">Lookup table</dd>
729 <dt>data</dt>
730 <dd class="description">Separation data</dd>
731 <dt>num_channels</dt>
732 <dd class="description">Number of components</dd>
733 <dt>p</dt>
734 <dd class="description">Pixels</dd>
735 </dl>
736 <h3 class="function"><a name="cupsDitherNew">cupsDitherNew</a></h3>
737 <p class="description">Create an error-diffusion dithering buffer.</p>
738 <p class="code">
739 <a href="#cups_dither_t">cups_dither_t</a> *cupsDitherNew (<br>
740 &nbsp;&nbsp;&nbsp;&nbsp;int width<br>
741 );</p>
742 <h4 class="parameters">Parameters</h4>
743 <dl>
744 <dt>width</dt>
745 <dd class="description">Width of output in pixels</dd>
746 </dl>
747 <h4 class="returnvalue">Return Value</h4>
748 <p class="description">New state array</p>
749 <h3 class="function"><a name="cupsFindAttr">cupsFindAttr</a></h3>
750 <p class="description">Find a PPD attribute based on the colormodel,
751 media, and resolution.</p>
752 <p class="code">
753 ppd_attr_t *cupsFindAttr (<br>
754 &nbsp;&nbsp;&nbsp;&nbsp;ppd_file_t *ppd,<br>
755 &nbsp;&nbsp;&nbsp;&nbsp;const char *name,<br>
756 &nbsp;&nbsp;&nbsp;&nbsp;const char *colormodel,<br>
757 &nbsp;&nbsp;&nbsp;&nbsp;const char *media,<br>
758 &nbsp;&nbsp;&nbsp;&nbsp;const char *resolution,<br>
759 &nbsp;&nbsp;&nbsp;&nbsp;char *spec,<br>
760 &nbsp;&nbsp;&nbsp;&nbsp;int specsize<br>
761 );</p>
762 <h4 class="parameters">Parameters</h4>
763 <dl>
764 <dt>ppd</dt>
765 <dd class="description">PPD file</dd>
766 <dt>name</dt>
767 <dd class="description">Attribute name</dd>
768 <dt>colormodel</dt>
769 <dd class="description">Color model</dd>
770 <dt>media</dt>
771 <dd class="description">Media type</dd>
772 <dt>resolution</dt>
773 <dd class="description">Resolution</dd>
774 <dt>spec</dt>
775 <dd class="description">Final selection string</dd>
776 <dt>specsize</dt>
777 <dd class="description">Size of string buffer</dd>
778 </dl>
779 <h4 class="returnvalue">Return Value</h4>
780 <p class="description">Matching attribute or NULL</p>
781 <h3 class="function"><a name="cupsLutDelete">cupsLutDelete</a></h3>
782 <p class="description">Free the memory used by a lookup table.</p>
783 <p class="code">
784 void cupsLutDelete (<br>
785 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_lut_t">cups_lut_t</a> *lut<br>
786 );</p>
787 <h4 class="parameters">Parameters</h4>
788 <dl>
789 <dt>lut</dt>
790 <dd class="description">Lookup table to free</dd>
791 </dl>
792 <h3 class="function"><a name="cupsLutLoad">cupsLutLoad</a></h3>
793 <p class="description">Load a LUT from a PPD file.</p>
794 <p class="code">
795 <a href="#cups_lut_t">cups_lut_t</a> *cupsLutLoad (<br>
796 &nbsp;&nbsp;&nbsp;&nbsp;ppd_file_t *ppd,<br>
797 &nbsp;&nbsp;&nbsp;&nbsp;const char *colormodel,<br>
798 &nbsp;&nbsp;&nbsp;&nbsp;const char *media,<br>
799 &nbsp;&nbsp;&nbsp;&nbsp;const char *resolution,<br>
800 &nbsp;&nbsp;&nbsp;&nbsp;const char *ink<br>
801 );</p>
802 <h4 class="parameters">Parameters</h4>
803 <dl>
804 <dt>ppd</dt>
805 <dd class="description">PPD file</dd>
806 <dt>colormodel</dt>
807 <dd class="description">Color model</dd>
808 <dt>media</dt>
809 <dd class="description">Media type</dd>
810 <dt>resolution</dt>
811 <dd class="description">Resolution</dd>
812 <dt>ink</dt>
813 <dd class="description">Ink name</dd>
814 </dl>
815 <h4 class="returnvalue">Return Value</h4>
816 <p class="description">New lookup table</p>
817 <h3 class="function"><a name="cupsLutNew">cupsLutNew</a></h3>
818 <p class="description">Make a lookup table from a list of pixel values.</p>
819 <p class="code">
820 <a href="#cups_lut_t">cups_lut_t</a> *cupsLutNew (<br>
821 &nbsp;&nbsp;&nbsp;&nbsp;int num_values,<br>
822 &nbsp;&nbsp;&nbsp;&nbsp;const float *values<br>
823 );</p>
824 <h4 class="parameters">Parameters</h4>
825 <dl>
826 <dt>num_values</dt>
827 <dd class="description">Number of values</dd>
828 <dt>values</dt>
829 <dd class="description">Lookup table values</dd>
830 </dl>
831 <h4 class="returnvalue">Return Value</h4>
832 <p class="description">New lookup table</p>
833 <h4 class="discussion">Discussion</h4>
834 <p class="discussion">Returns a pointer to the lookup table on success, NULL on failure.</p>
835 <h3 class="function"><a name="cupsPackHorizontal">cupsPackHorizontal</a></h3>
836 <p class="description">Pack pixels horizontally...</p>
837 <p class="code">
838 void cupsPackHorizontal (<br>
839 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *ipixels,<br>
840 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *obytes,<br>
841 &nbsp;&nbsp;&nbsp;&nbsp;int width,<br>
842 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char clearto,<br>
843 &nbsp;&nbsp;&nbsp;&nbsp;const int step<br>
844 );</p>
845 <h4 class="parameters">Parameters</h4>
846 <dl>
847 <dt>ipixels</dt>
848 <dd class="description">Input pixels</dd>
849 <dt>obytes</dt>
850 <dd class="description">Output bytes</dd>
851 <dt>width</dt>
852 <dd class="description">Number of pixels</dd>
853 <dt>clearto</dt>
854 <dd class="description">Initial value of bytes</dd>
855 <dt>step</dt>
856 <dd class="description">Step value between pixels</dd>
857 </dl>
858 <h3 class="function"><a name="cupsPackHorizontal2">cupsPackHorizontal2</a></h3>
859 <p class="description">Pack 2-bit pixels horizontally...</p>
860 <p class="code">
861 void cupsPackHorizontal2 (<br>
862 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *ipixels,<br>
863 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *obytes,<br>
864 &nbsp;&nbsp;&nbsp;&nbsp;int width,<br>
865 &nbsp;&nbsp;&nbsp;&nbsp;const int step<br>
866 );</p>
867 <h4 class="parameters">Parameters</h4>
868 <dl>
869 <dt>ipixels</dt>
870 <dd class="description">Input pixels</dd>
871 <dt>obytes</dt>
872 <dd class="description">Output bytes</dd>
873 <dt>width</dt>
874 <dd class="description">Number of pixels</dd>
875 <dt>step</dt>
876 <dd class="description">Stepping value</dd>
877 </dl>
878 <h3 class="function"><a name="cupsPackHorizontalBit">cupsPackHorizontalBit</a></h3>
879 <p class="description">Pack pixels horizontally by bit...</p>
880 <p class="code">
881 void cupsPackHorizontalBit (<br>
882 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *ipixels,<br>
883 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *obytes,<br>
884 &nbsp;&nbsp;&nbsp;&nbsp;int width,<br>
885 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char clearto,<br>
886 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char bit<br>
887 );</p>
888 <h4 class="parameters">Parameters</h4>
889 <dl>
890 <dt>ipixels</dt>
891 <dd class="description">Input pixels</dd>
892 <dt>obytes</dt>
893 <dd class="description">Output bytes</dd>
894 <dt>width</dt>
895 <dd class="description">Number of pixels</dd>
896 <dt>clearto</dt>
897 <dd class="description">Initial value of bytes</dd>
898 <dt>bit</dt>
899 <dd class="description">Bit to check</dd>
900 </dl>
901 <h3 class="function"><a name="cupsPackVertical">cupsPackVertical</a></h3>
902 <p class="description">Pack pixels vertically...</p>
903 <p class="code">
904 void cupsPackVertical (<br>
905 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *ipixels,<br>
906 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *obytes,<br>
907 &nbsp;&nbsp;&nbsp;&nbsp;int width,<br>
908 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char bit,<br>
909 &nbsp;&nbsp;&nbsp;&nbsp;const int step<br>
910 );</p>
911 <h4 class="parameters">Parameters</h4>
912 <dl>
913 <dt>ipixels</dt>
914 <dd class="description">Input pixels</dd>
915 <dt>obytes</dt>
916 <dd class="description">Output bytes</dd>
917 <dt>width</dt>
918 <dd class="description">Number of input pixels</dd>
919 <dt>bit</dt>
920 <dd class="description">Output bit</dd>
921 <dt>step</dt>
922 <dd class="description">Number of bytes between columns</dd>
923 </dl>
924 <h3 class="function"><a name="cupsRGBDelete">cupsRGBDelete</a></h3>
925 <p class="description">Delete a color separation.</p>
926 <p class="code">
927 void cupsRGBDelete (<br>
928 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_rgb_t">cups_rgb_t</a> *rgbptr<br>
929 );</p>
930 <h4 class="parameters">Parameters</h4>
931 <dl>
932 <dt>rgbptr</dt>
933 <dd class="description">Color separation</dd>
934 </dl>
935 <h3 class="function"><a name="cupsRGBDoGray">cupsRGBDoGray</a></h3>
936 <p class="description">Do a grayscale separation...</p>
937 <p class="code">
938 void cupsRGBDoGray (<br>
939 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_rgb_t">cups_rgb_t</a> *rgbptr,<br>
940 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
941 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *output,<br>
942 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
943 );</p>
944 <h4 class="parameters">Parameters</h4>
945 <dl>
946 <dt>rgbptr</dt>
947 <dd class="description">Color separation</dd>
948 <dt>input</dt>
949 <dd class="description">Input grayscale pixels</dd>
950 <dt>output</dt>
951 <dd class="description">Output Device-N pixels</dd>
952 <dt>num_pixels</dt>
953 <dd class="description">Number of pixels</dd>
954 </dl>
955 <h3 class="function"><a name="cupsRGBDoRGB">cupsRGBDoRGB</a></h3>
956 <p class="description">Do a RGB separation...</p>
957 <p class="code">
958 void cupsRGBDoRGB (<br>
959 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_rgb_t">cups_rgb_t</a> *rgbptr,<br>
960 &nbsp;&nbsp;&nbsp;&nbsp;const unsigned char *input,<br>
961 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char *output,<br>
962 &nbsp;&nbsp;&nbsp;&nbsp;int num_pixels<br>
963 );</p>
964 <h4 class="parameters">Parameters</h4>
965 <dl>
966 <dt>rgbptr</dt>
967 <dd class="description">Color separation</dd>
968 <dt>input</dt>
969 <dd class="description">Input RGB pixels</dd>
970 <dt>output</dt>
971 <dd class="description">Output Device-N pixels</dd>
972 <dt>num_pixels</dt>
973 <dd class="description">Number of pixels</dd>
974 </dl>
975 <h3 class="function"><a name="cupsRGBLoad">cupsRGBLoad</a></h3>
976 <p class="description">Load a RGB color profile from a PPD file.</p>
977 <p class="code">
978 <a href="#cups_rgb_t">cups_rgb_t</a> *cupsRGBLoad (<br>
979 &nbsp;&nbsp;&nbsp;&nbsp;ppd_file_t *ppd,<br>
980 &nbsp;&nbsp;&nbsp;&nbsp;const char *colormodel,<br>
981 &nbsp;&nbsp;&nbsp;&nbsp;const char *media,<br>
982 &nbsp;&nbsp;&nbsp;&nbsp;const char *resolution<br>
983 );</p>
984 <h4 class="parameters">Parameters</h4>
985 <dl>
986 <dt>ppd</dt>
987 <dd class="description">PPD file</dd>
988 <dt>colormodel</dt>
989 <dd class="description">Color model</dd>
990 <dt>media</dt>
991 <dd class="description">Media type</dd>
992 <dt>resolution</dt>
993 <dd class="description">Resolution</dd>
994 </dl>
995 <h4 class="returnvalue">Return Value</h4>
996 <p class="description">New color profile</p>
997 <h3 class="function"><a name="cupsRGBNew">cupsRGBNew</a></h3>
998 <p class="description">Create a new RGB color separation.</p>
999 <p class="code">
1000 <a href="#cups_rgb_t">cups_rgb_t</a> *cupsRGBNew (<br>
1001 &nbsp;&nbsp;&nbsp;&nbsp;int num_samples,<br>
1002 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_sample_t">cups_sample_t</a> *samples,<br>
1003 &nbsp;&nbsp;&nbsp;&nbsp;int cube_size,<br>
1004 &nbsp;&nbsp;&nbsp;&nbsp;int num_channels<br>
1005 );</p>
1006 <h4 class="parameters">Parameters</h4>
1007 <dl>
1008 <dt>num_samples</dt>
1009 <dd class="description">Number of samples</dd>
1010 <dt>samples</dt>
1011 <dd class="description">Samples</dd>
1012 <dt>cube_size</dt>
1013 <dd class="description">Size of LUT cube</dd>
1014 <dt>num_channels</dt>
1015 <dd class="description">Number of color components</dd>
1016 </dl>
1017 <h4 class="returnvalue">Return Value</h4>
1018 <p class="description">New color separation or NULL</p>
1019 <h2 class="title"><a name="TYPES">Data Types</a></h2>
1020 <h3 class="typedef"><a name="cups_cmyk_t">cups_cmyk_t</a></h3>
1021 <p class="description">Simple CMYK lookup table</p>
1022 <p class="code">
1023 typedef struct <a href="#cups_cmyk_s">cups_cmyk_s</a> cups_cmyk_t;
1024 </p>
1025 <h3 class="typedef"><a name="cups_dither_t">cups_dither_t</a></h3>
1026 <p class="description">Dithering State</p>
1027 <p class="code">
1028 typedef struct <a href="#cups_dither_s">cups_dither_s</a> cups_dither_t;
1029 </p>
1030 <h3 class="typedef"><a name="cups_lut_t">cups_lut_t</a></h3>
1031 <p class="description">Lookup Table for Dithering</p>
1032 <p class="code">
1033 typedef struct <a href="#cups_lut_s">cups_lut_s</a> cups_lut_t;
1034 </p>
1035 <h3 class="typedef"><a name="cups_rgb_t">cups_rgb_t</a></h3>
1036 <p class="description">Color separation lookup table</p>
1037 <p class="code">
1038 typedef struct <a href="#cups_rgb_s">cups_rgb_s</a> cups_rgb_t;
1039 </p>
1040 <h3 class="typedef"><a name="cups_sample_t">cups_sample_t</a></h3>
1041 <p class="description">Color sample point</p>
1042 <p class="code">
1043 typedef struct <a href="#cups_sample_s">cups_sample_s</a> cups_sample_t;
1044 </p>
1045 <h2 class="title"><a name="STRUCTURES">Structures</a></h2>
1046 <h3 class="struct"><a name="cups_cmyk_s">cups_cmyk_s</a></h3>
1047 <p class="description">Simple CMYK lookup table</p>
1048 <p class="code">struct cups_cmyk_s {<br>
1049 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char black_lut[256];<br>
1050 &nbsp;&nbsp;&nbsp;&nbsp;short *channels[CUPS_MAX_CHAN];<br>
1051 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char color_lut[256];<br>
1052 &nbsp;&nbsp;&nbsp;&nbsp;int ink_limit;<br>
1053 &nbsp;&nbsp;&nbsp;&nbsp;int num_channels;<br>
1054 };</p>
1055 <h4 class="members">Members</h4>
1056 <dl>
1057 <dt>black_lut[256] </dt>
1058 <dd class="description">Black generation LUT</dd>
1059 <dt>channels[CUPS_MAX_CHAN] </dt>
1060 <dd class="description">Lookup tables</dd>
1061 <dt>color_lut[256] </dt>
1062 <dd class="description">Color removal LUT</dd>
1063 <dt>ink_limit </dt>
1064 <dd class="description">Ink limit</dd>
1065 <dt>num_channels </dt>
1066 <dd class="description">Number of components</dd>
1067 </dl>
1068 <h3 class="struct"><a name="cups_dither_s">cups_dither_s</a></h3>
1069 <p class="description">Dithering State</p>
1070 <p class="code">struct cups_dither_s {<br>
1071 &nbsp;&nbsp;&nbsp;&nbsp;int errors[96];<br>
1072 &nbsp;&nbsp;&nbsp;&nbsp;int row;<br>
1073 &nbsp;&nbsp;&nbsp;&nbsp;int width;<br>
1074 };</p>
1075 <h4 class="members">Members</h4>
1076 <dl>
1077 <dt>errors[96] </dt>
1078 <dd class="description">Error values</dd>
1079 <dt>row </dt>
1080 <dd class="description">Current row</dd>
1081 <dt>width </dt>
1082 <dd class="description">Width of buffer</dd>
1083 </dl>
1084 <h3 class="struct"><a name="cups_lut_s">cups_lut_s</a></h3>
1085 <p class="description">Lookup Table for Dithering</p>
1086 <p class="code">struct cups_lut_s {<br>
1087 &nbsp;&nbsp;&nbsp;&nbsp;int error;<br>
1088 &nbsp;&nbsp;&nbsp;&nbsp;short intensity;<br>
1089 &nbsp;&nbsp;&nbsp;&nbsp;short pixel;<br>
1090 };</p>
1091 <h4 class="members">Members</h4>
1092 <dl>
1093 <dt>error </dt>
1094 <dd class="description">Error from desired value</dd>
1095 <dt>intensity </dt>
1096 <dd class="description">Adjusted intensity</dd>
1097 <dt>pixel </dt>
1098 <dd class="description">Output pixel value</dd>
1099 </dl>
1100 <h3 class="struct"><a name="cups_rgb_s">cups_rgb_s</a></h3>
1101 <p class="description">Color separation lookup table</p>
1102 <p class="code">struct cups_rgb_s {<br>
1103 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char black[CUPS_MAX_RGB];<br>
1104 &nbsp;&nbsp;&nbsp;&nbsp;int cache_init;<br>
1105 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char ****colors;<br>
1106 &nbsp;&nbsp;&nbsp;&nbsp;int cube_index[256];<br>
1107 &nbsp;&nbsp;&nbsp;&nbsp;int cube_mult[256];<br>
1108 &nbsp;&nbsp;&nbsp;&nbsp;int cube_size;<br>
1109 &nbsp;&nbsp;&nbsp;&nbsp;int num_channels;<br>
1110 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char white[CUPS_MAX_RGB];<br>
1111 };</p>
1112 <h4 class="members">Members</h4>
1113 <dl>
1114 <dt>black[CUPS_MAX_RGB] </dt>
1115 <dd class="description">Cached black (sRGB = 0,0,0)</dd>
1116 <dt>cache_init </dt>
1117 <dd class="description">Are cached values initialized?</dd>
1118 <dt>colors </dt>
1119 <dd class="description">4-D array of sample values</dd>
1120 <dt>cube_index[256] </dt>
1121 <dd class="description">Index into cube for a given sRGB value</dd>
1122 <dt>cube_mult[256] </dt>
1123 <dd class="description">Multiplier value for a given sRGB value</dd>
1124 <dt>cube_size </dt>
1125 <dd class="description">Size of color cube (2-N) on a side</dd>
1126 <dt>num_channels </dt>
1127 <dd class="description">Number of colors per sample</dd>
1128 <dt>white[CUPS_MAX_RGB] </dt>
1129 <dd class="description">Cached white (sRGB = 255,255,255)</dd>
1130 </dl>
1131 <h3 class="struct"><a name="cups_sample_s">cups_sample_s</a></h3>
1132 <p class="description">Color sample point</p>
1133 <p class="code">struct cups_sample_s {<br>
1134 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char colors[CUPS_MAX_RGB];<br>
1135 &nbsp;&nbsp;&nbsp;&nbsp;unsigned char rgb[3];<br>
1136 };</p>
1137 <h4 class="members">Members</h4>
1138 <dl>
1139 <dt>colors[CUPS_MAX_RGB] </dt>
1140 <dd class="description">Color values</dd>
1141 <dt>rgb[3] </dt>
1142 <dd class="description">sRGB values</dd>
1143 </dl>
1144 <h2 class="title"><a name="VARIABLES">Variables</a></h2>
1145 <h3 class="variable"><a name="cups_scmy_lut[256]">cups_scmy_lut[256]</a></h3>
1146 <p class="description">sRGB gamma lookup table (inverted)</p>
1147 <p class="code">extern const unsigned char cups_scmy_lut[256];</p>
1148 <h3 class="variable"><a name="cups_srgb_lut[256]">cups_srgb_lut[256]</a></h3>
1149 <p class="description">sRGB gamma lookup table</p>
1150 <p class="code">extern const unsigned char cups_srgb_lut[256];</p>
1151 </div>
1152 </body>
1153 </html>