]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/image.h
Load cups into easysw/current.
[thirdparty/cups.git] / filter / image.h
CommitLineData
ef416fc2 1/*
f7faf1f5 2 * "$Id: image.h 5191 2006-02-27 02:47:56Z mike $"
ef416fc2 3 *
4 * Image library definitions for the Common UNIX Printing System (CUPS).
5 *
b423cd4c 6 * Copyright 1993-2006 by Easy Software Products.
ef416fc2 7 *
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
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 *
24 * This file is subject to the Apple OS-Developed Software exception.
25 */
26
27#ifndef _CUPS_IMAGE_H_
28# define _CUPS_IMAGE_H_
29
30/*
31 * Include necessary headers...
32 */
33
34# include <stdio.h>
35# include "raster.h"
36
37# ifdef __cplusplus
38extern "C" {
39# endif /* __cplusplus */
40
41/*
42 * Constants...
43 */
44
45typedef enum cups_icspace_e /**** Image colorspaces ****/
46{
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 */
53} cups_icspace_t;
54
ef416fc2 55
56/*
57 * Types and structures...
58 */
59
60typedef unsigned char cups_ib_t; /**** Image byte ****/
61
62struct cups_image_s;
63typedef struct cups_image_s cups_image_t;
64 /**** Image file data ****/
65
66struct cups_izoom_s;
67typedef struct cups_izoom_s cups_izoom_t;
68 /**** Image zoom data ****/
69
70
71/*
72 * Prototypes...
73 */
74
75extern void cupsImageClose(cups_image_t *img);
76extern void cupsImageCMYKToBlack(const cups_ib_t *in,
77 cups_ib_t *out, int count);
78extern void cupsImageCMYKToCMY(const cups_ib_t *in,
79 cups_ib_t *out, int count);
80extern void cupsImageCMYKToCMYK(const cups_ib_t *in,
81 cups_ib_t *out, int count);
82extern void cupsImageCMYKToRGB(const cups_ib_t *in,
83 cups_ib_t *out, int count);
84extern void cupsImageCMYKToWhite(const cups_ib_t *in,
85 cups_ib_t *out, int count);
86extern int cupsImageGetCol(cups_image_t *img, int x, int y,
87 int height, cups_ib_t *pixels);
88extern cups_icspace_t cupsImageGetColorSpace(cups_image_t *img);
89extern int cupsImageGetDepth(cups_image_t *img);
90extern unsigned cupsImageGetHeight(cups_image_t *img);
91extern int cupsImageGetRow(cups_image_t *img, int x, int y,
92 int width, cups_ib_t *pixels);
93extern unsigned cupsImageGetWidth(cups_image_t *img);
94extern unsigned cupsImageGetXPPI(cups_image_t *img);
95extern unsigned cupsImageGetYPPI(cups_image_t *img);
96extern void cupsImageLut(cups_ib_t *pixels, int count,
97 const cups_ib_t *lut);
98extern 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);
103extern void cupsImageRGBAdjust(cups_ib_t *pixels, int count,
104 int saturation, int hue);
105extern void cupsImageRGBToBlack(const cups_ib_t *in,
106 cups_ib_t *out, int count);
107extern void cupsImageRGBToCMY(const cups_ib_t *in,
108 cups_ib_t *out, int count);
109extern void cupsImageRGBToCMYK(const cups_ib_t *in,
110 cups_ib_t *out, int count);
111extern void cupsImageRGBToRGB(const cups_ib_t *in,
112 cups_ib_t *out, int count);
113extern void cupsImageRGBToWhite(const cups_ib_t *in,
114 cups_ib_t *out, int count);
115extern void cupsImageSetMaxTiles(cups_image_t *img, int max_tiles);
116extern void cupsImageSetProfile(float d, float g,
117 float matrix[3][3]);
118extern void cupsImageSetRasterColorSpace(cups_cspace_t cs);
119extern void cupsImageWhiteToBlack(const cups_ib_t *in,
120 cups_ib_t *out, int count);
121extern void cupsImageWhiteToCMY(const cups_ib_t *in,
122 cups_ib_t *out, int count);
123extern void cupsImageWhiteToCMYK(const cups_ib_t *in,
124 cups_ib_t *out, int count);
125extern void cupsImageWhiteToRGB(const cups_ib_t *in,
126 cups_ib_t *out, int count);
127extern void cupsImageWhiteToWhite(const cups_ib_t *in,
128 cups_ib_t *out, int count);
ef416fc2 129
130
131# ifdef __cplusplus
132}
133# endif /* __cplusplus */
134
135#endif /* !_CUPS_IMAGE_H_ */
136
137/*
f7faf1f5 138 * End of "$Id: image.h 5191 2006-02-27 02:47:56Z mike $".
ef416fc2 139 */