beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / poppler / JPEG2000Stream.h
blob73b6bdd97b83f237e7d9889221539d731bbf8932
1 //========================================================================
2 //
3 // JPEG2000Stream.h
4 //
5 // A JPX stream decoder using OpenJPEG
6 //
7 // Copyright 2008, 2010 Albert Astals Cid <aacid@kde.org>
8 // Copyright 2011 Daniel Glöckner <daniel-gl@gmx.net>
9 // Copyright 2013, 2014 Adrian Johnson <ajohnson@redneon.com>
10 // Copyright 2015 Adam Reichold <adam.reichold@t-online.de>
12 // Licensed under GPLv2 or later
14 //========================================================================
17 #ifndef JPEG2000STREAM_H
18 #define JPEG2000STREAM_H
20 #include "config.h"
21 #include "goo/gtypes.h"
22 #include "Object.h"
23 #include "Stream.h"
25 struct JPXStreamPrivate;
27 class JPXStream: public FilterStream {
28 public:
30 JPXStream(Stream *strA);
31 virtual ~JPXStream();
32 virtual StreamKind getKind() { return strJPX; }
33 virtual void reset();
34 virtual void close();
35 virtual Goffset getPos();
36 virtual int getChar();
37 virtual int lookChar();
38 virtual GooString *getPSFilter(int psLevel, const char *indent);
39 virtual GBool isBinary(GBool last = gTrue);
40 virtual void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode);
42 int readStream(int nChars, Guchar *buffer) {
43 return str->doGetChars(nChars, buffer);
45 private:
46 JPXStream(const JPXStream &other);
47 JPXStream& operator=(const JPXStream &other);
48 JPXStreamPrivate *priv;
50 void init();
51 virtual GBool hasGetChars() { return true; }
52 virtual int getChars(int nChars, Guchar *buffer);
55 #endif