~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/gdevimdi.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
  San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15
15
*/
16
16
 
17
 
/* $Id: gdevimdi.c 7043 2006-09-14 01:57:35Z giles $ */
 
17
/* $Id: gdevimdi.c 8250 2007-09-25 13:31:24Z giles $ */
18
18
/* IMDI Device.
19
19
 *
20
20
 * This is an RGB contone device, that outputs the raster
47
47
 
48
48
typedef struct gx_device_imdi_s gx_device_imdi;
49
49
 
50
 
private dev_proc_open_device(imdi_open_device);
51
 
private dev_proc_close_device(imdi_close_device);
52
 
private dev_proc_print_page(imdi_print_page);
 
50
static dev_proc_open_device(imdi_open_device);
 
51
static dev_proc_close_device(imdi_close_device);
 
52
static dev_proc_print_page(imdi_print_page);
53
53
 
54
54
struct gx_device_imdi_s
55
55
{
62
62
    imdi *mdo;
63
63
};
64
64
 
65
 
private const gx_device_procs imdi_procs =
 
65
static const gx_device_procs imdi_procs =
66
66
{
67
67
    imdi_open_device, NULL, NULL, gdev_prn_output_page, imdi_close_device,
68
68
    gx_default_rgb_map_rgb_color, gx_default_rgb_map_color_rgb,
80
80
            3, 24, 255, 255, 256, 256, imdi_print_page)
81
81
};
82
82
 
83
 
private double incurve(void *ctx, int ch, double val)
84
 
{
85
 
    return val;
86
 
}
87
 
 
88
 
private double outcurve(void *ctx, int ch, double val)
89
 
{
90
 
    return val;
91
 
}
92
 
 
93
 
private void mdtable(void *ctx, double *outvals, double *invals)
 
83
static double incurve(void *ctx, int ch, double val)
 
84
{
 
85
    return val;
 
86
}
 
87
 
 
88
static double outcurve(void *ctx, int ch, double val)
 
89
{
 
90
    return val;
 
91
}
 
92
 
 
93
static void mdtable(void *ctx, double *outvals, double *invals)
94
94
{
95
95
    icmLuBase *luo = ctx;
96
96
    luo->lookup(luo, outvals, invals);
101
101
 * Load ICC device link profile (to map sRGB to FOGRA CMYK).
102
102
 */
103
103
 
104
 
private int
 
104
static int
105
105
imdi_open_device(gx_device *dev)
106
106
{
107
107
    gx_device_imdi *idev = (gx_device_imdi*)dev;
138
138
    
139
139
    luo->spaces(luo, &ins, &inn, &outs, &outn, &alg, NULL, NULL, NULL);
140
140
 
 
141
#ifdef DEBUG
141
142
    dprintf3("%s -> %s [%s]\n",
142
143
            icm2str(icmColorSpaceSignature, ins),
143
144
            icm2str(icmColorSpaceSignature, outs),
144
145
            icm2str(icmLuAlg, alg));
 
146
#endif
145
147
 
146
148
    if (inn != 3)
147
149
        return gs_throw1(-1, "profile must have 3 input channels. got %d.", inn);
168
170
 * Close device and clean up ICC structures.
169
171
 */
170
172
 
171
 
private int
 
173
static int
172
174
imdi_close_device(gx_device *dev)
173
175
{
174
176
    gx_device_imdi *idev = (gx_device_imdi*)dev;
186
188
 * Output the page raster.
187
189
 */
188
190
 
189
 
private int
 
191
static int
190
192
imdi_print_page(gx_device_printer *pdev, FILE *prn_stream)
191
193
{
192
194
    gx_device_imdi *idev = (gx_device_imdi*)pdev;