]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
75bd9771 | 2 | * "$Id: image.h 7306 2008-02-15 00:52:38Z mike $" |
ef416fc2 | 3 | * |
4 | * Image library definitions for the Common UNIX Printing System (CUPS). | |
5 | * | |
bc44d920 | 6 | * Copyright 2007 by Apple Inc. |
b423cd4c | 7 | * Copyright 1993-2006 by Easy Software Products. |
ef416fc2 | 8 | * |
9 | * These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | * property of Apple Inc. and are protected by Federal copyright |
11 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | * which should have been included with this file. If this file is | |
13 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | * |
15 | * This file is subject to the Apple OS-Developed Software exception. | |
16 | */ | |
17 | ||
18 | #ifndef _CUPS_IMAGE_H_ | |
19 | # define _CUPS_IMAGE_H_ | |
20 | ||
21 | /* | |
22 | * Include necessary headers... | |
23 | */ | |
24 | ||
25 | # include <stdio.h> | |
ac884b6a | 26 | # include <cups/raster.h> |
ef416fc2 | 27 | |
28 | # ifdef __cplusplus | |
29 | extern "C" { | |
30 | # endif /* __cplusplus */ | |
31 | ||
32 | /* | |
33 | * Constants... | |
34 | */ | |
35 | ||
36 | typedef enum cups_icspace_e /**** Image colorspaces ****/ | |
37 | { | |
38 | CUPS_IMAGE_CMYK = -4, /* Cyan, magenta, yellow, and black */ | |
39 | CUPS_IMAGE_CMY = -3, /* Cyan, magenta, and yellow */ | |
40 | CUPS_IMAGE_BLACK = -1, /* Black */ | |
41 | CUPS_IMAGE_WHITE = 1, /* White (luminance) */ | |
42 | CUPS_IMAGE_RGB = 3, /* Red, green, and blue */ | |
43 | CUPS_IMAGE_RGB_CMYK = 4 /* Use RGB or CMYK */ | |
44 | } cups_icspace_t; | |
45 | ||
ef416fc2 | 46 | |
47 | /* | |
48 | * Types and structures... | |
49 | */ | |
50 | ||
51 | typedef unsigned char cups_ib_t; /**** Image byte ****/ | |
52 | ||
53 | struct cups_image_s; | |
54 | typedef struct cups_image_s cups_image_t; | |
55 | /**** Image file data ****/ | |
56 | ||
57 | struct cups_izoom_s; | |
58 | typedef struct cups_izoom_s cups_izoom_t; | |
59 | /**** Image zoom data ****/ | |
60 | ||
61 | ||
62 | /* | |
63 | * Prototypes... | |
64 | */ | |
65 | ||
2fb76298 | 66 | extern void cupsImageClose(cups_image_t *img) _CUPS_API_1_2; |
ef416fc2 | 67 | extern void cupsImageCMYKToBlack(const cups_ib_t *in, |
2fb76298 | 68 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 69 | extern void cupsImageCMYKToCMY(const cups_ib_t *in, |
2fb76298 | 70 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 71 | extern void cupsImageCMYKToCMYK(const cups_ib_t *in, |
2fb76298 | 72 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 73 | extern void cupsImageCMYKToRGB(const cups_ib_t *in, |
2fb76298 | 74 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 75 | extern void cupsImageCMYKToWhite(const cups_ib_t *in, |
2fb76298 | 76 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 77 | extern int cupsImageGetCol(cups_image_t *img, int x, int y, |
2fb76298 MS |
78 | int height, cups_ib_t *pixels) _CUPS_API_1_2; |
79 | extern cups_icspace_t cupsImageGetColorSpace(cups_image_t *img) _CUPS_API_1_2; | |
80 | extern int cupsImageGetDepth(cups_image_t *img) _CUPS_API_1_2; | |
81 | extern unsigned cupsImageGetHeight(cups_image_t *img) _CUPS_API_1_2; | |
ef416fc2 | 82 | extern int cupsImageGetRow(cups_image_t *img, int x, int y, |
2fb76298 MS |
83 | int width, cups_ib_t *pixels) _CUPS_API_1_2; |
84 | extern unsigned cupsImageGetWidth(cups_image_t *img) _CUPS_API_1_2; | |
85 | extern unsigned cupsImageGetXPPI(cups_image_t *img) _CUPS_API_1_2; | |
86 | extern unsigned cupsImageGetYPPI(cups_image_t *img) _CUPS_API_1_2; | |
ef416fc2 | 87 | extern void cupsImageLut(cups_ib_t *pixels, int count, |
2fb76298 | 88 | const cups_ib_t *lut) _CUPS_API_1_2; |
ef416fc2 | 89 | extern cups_image_t *cupsImageOpen(const char *filename, |
90 | cups_icspace_t primary, | |
91 | cups_icspace_t secondary, | |
92 | int saturation, int hue, | |
2fb76298 | 93 | const cups_ib_t *lut) _CUPS_API_1_2; |
ef416fc2 | 94 | extern void cupsImageRGBAdjust(cups_ib_t *pixels, int count, |
2fb76298 | 95 | int saturation, int hue) _CUPS_API_1_2; |
ef416fc2 | 96 | extern void cupsImageRGBToBlack(const cups_ib_t *in, |
2fb76298 | 97 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 98 | extern void cupsImageRGBToCMY(const cups_ib_t *in, |
2fb76298 | 99 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 100 | extern void cupsImageRGBToCMYK(const cups_ib_t *in, |
2fb76298 | 101 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 102 | extern void cupsImageRGBToRGB(const cups_ib_t *in, |
2fb76298 | 103 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 104 | extern void cupsImageRGBToWhite(const cups_ib_t *in, |
2fb76298 MS |
105 | cups_ib_t *out, int count) _CUPS_API_1_2; |
106 | extern void cupsImageSetMaxTiles(cups_image_t *img, int max_tiles) _CUPS_API_1_2; | |
ef416fc2 | 107 | extern void cupsImageSetProfile(float d, float g, |
2fb76298 MS |
108 | float matrix[3][3]) _CUPS_API_1_2; |
109 | extern void cupsImageSetRasterColorSpace(cups_cspace_t cs) _CUPS_API_1_2; | |
ef416fc2 | 110 | extern void cupsImageWhiteToBlack(const cups_ib_t *in, |
2fb76298 | 111 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 112 | extern void cupsImageWhiteToCMY(const cups_ib_t *in, |
2fb76298 | 113 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 114 | extern void cupsImageWhiteToCMYK(const cups_ib_t *in, |
2fb76298 | 115 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 116 | extern void cupsImageWhiteToRGB(const cups_ib_t *in, |
2fb76298 | 117 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 118 | extern void cupsImageWhiteToWhite(const cups_ib_t *in, |
2fb76298 | 119 | cups_ib_t *out, int count) _CUPS_API_1_2; |
ef416fc2 | 120 | |
121 | ||
122 | # ifdef __cplusplus | |
123 | } | |
124 | # endif /* __cplusplus */ | |
125 | ||
126 | #endif /* !_CUPS_IMAGE_H_ */ | |
127 | ||
128 | /* | |
75bd9771 | 129 | * End of "$Id: image.h 7306 2008-02-15 00:52:38Z mike $". |
ef416fc2 | 130 | */ |