2 * "$Id: image.h 4741 2005-10-02 04:25:52Z mike $"
4 * Image library definitions for the Common UNIX Printing System (CUPS).
6 * Copyright 1993-2005 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 */
55 typedef enum cups_iztype_e
/**** Image zoom type ****/
57 CUPS_IZOOM_FAST
, /* Use nearest-neighbor sampling */
58 CUPS_IZOOM_NORMAL
, /* Use bilinear interpolation */
59 CUPS_IZOOM_BEST
/* Use bicubic interpolation */
64 * Types and structures...
67 typedef unsigned char cups_ib_t
; /**** Image byte ****/
70 typedef struct cups_image_s cups_image_t
;
71 /**** Image file data ****/
74 typedef struct cups_izoom_s cups_izoom_t
;
75 /**** Image zoom data ****/
82 extern void cupsImageClose(cups_image_t
*img
);
83 extern void cupsImageCMYKToBlack(const cups_ib_t
*in
,
84 cups_ib_t
*out
, int count
);
85 extern void cupsImageCMYKToCMY(const cups_ib_t
*in
,
86 cups_ib_t
*out
, int count
);
87 extern void cupsImageCMYKToCMYK(const cups_ib_t
*in
,
88 cups_ib_t
*out
, int count
);
89 extern void cupsImageCMYKToRGB(const cups_ib_t
*in
,
90 cups_ib_t
*out
, int count
);
91 extern void cupsImageCMYKToWhite(const cups_ib_t
*in
,
92 cups_ib_t
*out
, int count
);
93 extern int cupsImageGetCol(cups_image_t
*img
, int x
, int y
,
94 int height
, cups_ib_t
*pixels
);
95 extern cups_icspace_t
cupsImageGetColorSpace(cups_image_t
*img
);
96 extern int cupsImageGetDepth(cups_image_t
*img
);
97 extern unsigned cupsImageGetHeight(cups_image_t
*img
);
98 extern int cupsImageGetRow(cups_image_t
*img
, int x
, int y
,
99 int width
, cups_ib_t
*pixels
);
100 extern unsigned cupsImageGetWidth(cups_image_t
*img
);
101 extern unsigned cupsImageGetXPPI(cups_image_t
*img
);
102 extern unsigned cupsImageGetYPPI(cups_image_t
*img
);
103 extern void cupsImageLut(cups_ib_t
*pixels
, int count
,
104 const cups_ib_t
*lut
);
105 extern cups_image_t
*cupsImageOpen(const char *filename
,
106 cups_icspace_t primary
,
107 cups_icspace_t secondary
,
108 int saturation
, int hue
,
109 const cups_ib_t
*lut
);
110 extern void cupsImageRGBAdjust(cups_ib_t
*pixels
, int count
,
111 int saturation
, int hue
);
112 extern void cupsImageRGBToBlack(const cups_ib_t
*in
,
113 cups_ib_t
*out
, int count
);
114 extern void cupsImageRGBToCMY(const cups_ib_t
*in
,
115 cups_ib_t
*out
, int count
);
116 extern void cupsImageRGBToCMYK(const cups_ib_t
*in
,
117 cups_ib_t
*out
, int count
);
118 extern void cupsImageRGBToRGB(const cups_ib_t
*in
,
119 cups_ib_t
*out
, int count
);
120 extern void cupsImageRGBToWhite(const cups_ib_t
*in
,
121 cups_ib_t
*out
, int count
);
122 extern void cupsImageSetMaxTiles(cups_image_t
*img
, int max_tiles
);
123 extern void cupsImageSetProfile(float d
, float g
,
125 extern void cupsImageSetRasterColorSpace(cups_cspace_t cs
);
126 extern void cupsImageWhiteToBlack(const cups_ib_t
*in
,
127 cups_ib_t
*out
, int count
);
128 extern void cupsImageWhiteToCMY(const cups_ib_t
*in
,
129 cups_ib_t
*out
, int count
);
130 extern void cupsImageWhiteToCMYK(const cups_ib_t
*in
,
131 cups_ib_t
*out
, int count
);
132 extern void cupsImageWhiteToRGB(const cups_ib_t
*in
,
133 cups_ib_t
*out
, int count
);
134 extern void cupsImageWhiteToWhite(const cups_ib_t
*in
,
135 cups_ib_t
*out
, int count
);
136 extern void cupsImageZoomDelete(cups_izoom_t
*z
);
137 extern void cupsImageZoomFill(cups_izoom_t
*z
, int iy
);
138 extern cups_izoom_t
*cupsImageZoomNew(cups_image_t
*img
, int x0
, int y0
,
139 int x1
, int y1
, int xsize
, int ysize
,
140 int rotated
, cups_iztype_t type
);
145 # endif /* __cplusplus */
147 #endif /* !_CUPS_IMAGE_H_ */
150 * End of "$Id: image.h 4741 2005-10-02 04:25:52Z mike $".