1 //========================================================================
5 // This file is licensed under the GPLv2 or later
7 // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
8 // Copyright (C) 2010, 2012 Adrian Johnson <ajohnson@redneon.com>
9 // Copyright (C) 2010 Jürg Billeter <j@bitron.ch>
10 // Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org>
11 // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
12 // Copyright (C) 2011 Albert Astals Cid <aacid@kde.org>
13 // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
15 //========================================================================
20 #include "poppler-config.h"
24 #include <sys/types.h>
25 #include "ImgWriter.h"
27 struct JpegWriterPrivate
;
29 class JpegWriter
: public ImgWriter
32 /* RGB - 3 bytes/pixel
34 * CMYK - 4 bytes/pixel
36 enum Format
{ RGB
, GRAY
, CMYK
};
38 JpegWriter(int quality
, bool progressive
, Format format
= RGB
);
39 JpegWriter(Format format
= RGB
);
42 bool init(FILE *f
, int width
, int height
, int hDPI
, int vDPI
);
44 bool writePointers(unsigned char **rowPointers
, int rowCount
);
45 bool writeRow(unsigned char **row
);
51 JpegWriter(const JpegWriter
&other
);
52 JpegWriter
& operator=(const JpegWriter
&other
);
54 JpegWriterPrivate
*priv
;