~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/poppler/goo/JpegWriter.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
Import upstream version 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
25
extern "C" {
 
26
#include <jpeglib.h>
 
27
}
 
28
 
 
29
class 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