source: trunk/poppler/mypoppler/goo/JpegWriter.h @ 461

Last change on this file since 461 was 461, checked in by Silvan Scherrer, 11 years ago

poppler update to 0.14.2

File size: 1.1 KB
Line 
1//========================================================================
2//
3// JpegWriter.h
4//
5// This file is licensed under the GPLv2 or later
6//
7// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
8// Copyright (C) 2010 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//
13//========================================================================
14
15#ifndef JPEGWRITER_H
16#define JPEGWRITER_H
17
18#include <config.h>
19
20#ifdef ENABLE_LIBJPEG
21
22#include <sys/types.h>
23#include "ImgWriter.h"
24
25extern "C" {
26#include <jpeglib.h>
27}
28
29class JpegWriter : public ImgWriter
30{
31        public:
32                JpegWriter(int quality, bool progressive);
33                JpegWriter();
34                ~JpegWriter();
35               
36                bool init(FILE *f, int width, int height, int hDPI, int vDPI);
37               
38                bool writePointers(unsigned char **rowPointers, int rowCount);
39                bool writeRow(unsigned char **row);
40               
41                bool close();
42       
43        private:
44                bool progressive;
45                int quality;
46                struct jpeg_compress_struct cinfo;
47                struct jpeg_error_mgr jerr;
48};
49
50#endif
51
52#endif
Note: See TracBrowser for help on using the repository browser.