2 * "$Id: image.h 5191 2006-02-27 02:47:56Z mike $"
4 * Image library definitions for the Common UNIX Printing System (CUPS).
6 * Copyright 1993-2006 by Easy Software Products.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
24 * This file is subject to the Apple OS-Developed Software exception.
27 #ifndef _CUPS_IMAGE_H_
28 # define _CUPS_IMAGE_H_
31 * Include necessary headers...
39 # endif /* __cplusplus */
45 typedef enum cups_icspace_e
/**** Image colorspaces ****/
47 CUPS_IMAGE_CMYK
= -4, /* Cyan, magenta, yellow, and black */
48 CUPS_IMAGE_CMY
= -3, /* Cyan, magenta, and yellow */
49 CUPS_IMAGE_BLACK
= -1, /* Black */
50 CUPS_IMAGE_WHITE
= 1, /* White (luminance) */
51 CUPS_IMAGE_RGB
= 3, /* Red, green, and blue */
52 CUPS_IMAGE_RGB_CMYK
= 4 /* Use RGB or CMYK */
57 * Types and structures...
60 typedef unsigned char cups_ib_t
; /**** Image byte ****/
63 typedef struct cups_image_s cups_image_t
;
64 /**** Image file data ****/
67 typedef struct cups_izoom_s cups_izoom_t
;
68 /**** Image zoom data ****/
75 extern void cupsImageClose(cups_image_t
*img
);
76 extern void cupsImageCMYKToBlack(const cups_ib_t
*in
,
77 cups_ib_t
*out
, int count
);
78 extern void cupsImageCMYKToCMY(const cups_ib_t
*in
,
79 cups_ib_t
*out
, int count
);
80 extern void cupsImageCMYKToCMYK(const cups_ib_t
*in
,
81 cups_ib_t
*out
, int count
);
82 extern void cupsImageCMYKToRGB(const cups_ib_t
*in
,
83 cups_ib_t
*out
, int count
);
84 extern void cupsImageCMYKToWhite(const cups_ib_t
*in
,
85 cups_ib_t
*out
, int count
);
86 extern int cupsImageGetCol(cups_image_t
*img
, int x
, int y
,
87 int height
, cups_ib_t
*pixels
);
88 extern cups_icspace_t
cupsImageGetColorSpace(cups_image_t
*img
);
89 extern int cupsImageGetDepth(cups_image_t
*img
);
90 extern unsigned cupsImageGetHeight(cups_image_t
*img
);
91 extern int cupsImageGetRow(cups_image_t
*img
, int x
, int y
,
92 int width
, cups_ib_t
*pixels
);
93 extern unsigned cupsImageGetWidth(cups_image_t
*img
);
94 extern unsigned cupsImageGetXPPI(cups_image_t
*img
);
95 extern unsigned cupsImageGetYPPI(cups_image_t
*img
);
96 extern void cupsImageLut(cups_ib_t
*pixels
, int count
,
97 const cups_ib_t
*lut
);
98 extern cups_image_t
*cupsImageOpen(const char *filename
,
99 cups_icspace_t primary
,
100 cups_icspace_t secondary
,
101 int saturation
, int hue
,
102 const cups_ib_t
*lut
);
103 extern void cupsImageRGBAdjust(cups_ib_t
*pixels
, int count
,
104 int saturation
, int hue
);
105 extern void cupsImageRGBToBlack(const cups_ib_t
*in
,
106 cups_ib_t
*out
, int count
);
107 extern void cupsImageRGBToCMY(const cups_ib_t
*in
,
108 cups_ib_t
*out
, int count
);
109 extern void cupsImageRGBToCMYK(const cups_ib_t
*in
,
110 cups_ib_t
*out
, int count
);
111 extern void cupsImageRGBToRGB(const cups_ib_t
*in
,
112 cups_ib_t
*out
, int count
);
113 extern void cupsImageRGBToWhite(const cups_ib_t
*in
,
114 cups_ib_t
*out
, int count
);
115 extern void cupsImageSetMaxTiles(cups_image_t
*img
, int max_tiles
);
116 extern void cupsImageSetProfile(float d
, float g
,
118 extern void cupsImageSetRasterColorSpace(cups_cspace_t cs
);
119 extern void cupsImageWhiteToBlack(const cups_ib_t
*in
,
120 cups_ib_t
*out
, int count
);
121 extern void cupsImageWhiteToCMY(const cups_ib_t
*in
,
122 cups_ib_t
*out
, int count
);
123 extern void cupsImageWhiteToCMYK(const cups_ib_t
*in
,
124 cups_ib_t
*out
, int count
);
125 extern void cupsImageWhiteToRGB(const cups_ib_t
*in
,
126 cups_ib_t
*out
, int count
);
127 extern void cupsImageWhiteToWhite(const cups_ib_t
*in
,
128 cups_ib_t
*out
, int count
);
133 # endif /* __cplusplus */
135 #endif /* !_CUPS_IMAGE_H_ */
138 * End of "$Id: image.h 5191 2006-02-27 02:47:56Z mike $".