1 //========================================================================
5 // This file is licensed under the GPLv2 or later
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 //========================================================================
17 #include "poppler-config.h"
21 #include <sys/types.h>
22 #include "ImgWriter.h"
24 struct TiffWriterPrivate
;
26 class TiffWriter
: public ImgWriter
29 /* RGB - 3 bytes/pixel
30 * RGBA_PREMULTIPLIED - 4 bytes/pixel premultiplied by alpha
32 * MONOCHROME - 8 pixels/byte
33 * CMYK - 4 bytes/pixel
35 enum Format
{ RGB
, RGBA_PREMULTIPLIED
, GRAY
, MONOCHROME
, CMYK
};
37 TiffWriter(Format format
= RGB
);
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; }
52 TiffWriter(const TiffWriter
&other
);
53 TiffWriter
& operator=(const TiffWriter
&other
);
55 TiffWriterPrivate
*priv
;