beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / goo / TiffWriter.h
blob52fdd53efa50e3ea91976f743e7c941ebda8164c
1 //========================================================================
2 //
3 // TiffWriter.h
4 //
5 // This file is licensed under the GPLv2 or later
6 //
7 // Copyright (C) 2010, 2012 William Bader <williambader@hotmail.com>
8 // Copyright (C) 2011, 2012 Albert Astals Cid <aacid@kde.org>
9 // Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
10 // Copyright (C) 2012 Pino Toscano <pino@kde.org>
12 //========================================================================
14 #ifndef TIFFWRITER_H
15 #define TIFFWRITER_H
17 #include "poppler-config.h"
19 #ifdef ENABLE_LIBTIFF
21 #include <sys/types.h>
22 #include "ImgWriter.h"
24 struct TiffWriterPrivate;
26 class TiffWriter : public ImgWriter
28 public:
29 /* RGB - 3 bytes/pixel
30 * RGBA_PREMULTIPLIED - 4 bytes/pixel premultiplied by alpha
31 * GRAY - 1 byte/pixel
32 * MONOCHROME - 8 pixels/byte
33 * CMYK - 4 bytes/pixel
35 enum Format { RGB, RGBA_PREMULTIPLIED, GRAY, MONOCHROME, CMYK };
37 TiffWriter(Format format = RGB);
38 ~TiffWriter();
40 void setCompressionString(const char *compressionStringArg);
42 bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI);
44 bool writePointers(unsigned char **rowPointers, int rowCount);
45 bool writeRow(unsigned char **rowData);
47 bool supportCMYK() { return true; }
49 bool close();
51 private:
52 TiffWriter(const TiffWriter &other);
53 TiffWriter& operator=(const TiffWriter &other);
55 TiffWriterPrivate *priv;
58 #endif
60 #endif