1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-indent-level: 8; c-basic-offset: 8 -*- */
3 * Copyright (C) 2003 Remi Cohen-Scali
6 * Remi Cohen-Scali <Remi@Cohen-Scali.com>
8 * GPdf is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * GPdf is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 * License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
40 ThumbColorMap(int bitsA, Object *obj, GfxColorSpace *csA);
43 GBool isOk() {return ok; };
45 GfxColorSpace *getColorSpace() { return cs; };
47 int getNumPixelComps() { return nComps; };
48 int getBits() { return bits; };
50 void getGray(Guchar *x, double *gray);
51 void getRGB(Guchar *x, GfxRGB *rgb);
52 void getCMYK(Guchar *x, GfxCMYK *cmyk);
53 //void getColor(Guchar *x, GfxColor *color);
55 static ThumbColorMap *lookupColorMap(XRef *xref, int bitsA, Object *obj, GfxColorSpace *csA);
76 /* FIXME: Should have a class to avoid reading same colormap for every thumb */
85 Thumb(XRef *xrefA, Object *obj);
88 int getWidth(void) {return width; };
89 int getHeight(void) {return height; };
90 GfxColorSpace *getColorSpace(void) {return gfxCS; };
91 int getBitsPerComponent(void) {return bits; };
92 int getLength(void) {return length; };
94 Stream *getStream() {return str; };
96 unsigned char *getPixbufData();
101 GfxColorSpace *gfxCS;
102 ThumbColorMap *thumbCM;
103 int width, height, bits;