summaryrefslogtreecommitdiff
path: root/poppler/JPEG2000Stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/JPEG2000Stream.cc')
-rw-r--r--poppler/JPEG2000Stream.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/poppler/JPEG2000Stream.cc b/poppler/JPEG2000Stream.cc
index b7a29bf2..5ea6406e 100644
--- a/poppler/JPEG2000Stream.cc
+++ b/poppler/JPEG2000Stream.cc
@@ -4,7 +4,7 @@
//
// A JPX stream decoder using OpenJPEG
//
-// Copyright 2008-2010 Albert Astals Cid <aacid@kde.org>
+// Copyright 2008-2010, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright 2011 Daniel Glöckner <daniel-gl@gmx.net>
//
// Licensed under GPLv2 or later
@@ -13,6 +13,8 @@
#include "JPEG2000Stream.h"
+#include "config.h"
+
JPXStream::JPXStream(Stream *strA) : FilterStream(strA)
{
inited = gFalse;
@@ -127,6 +129,9 @@ void JPXStream::init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format)
/* Use default decompression parameters */
opj_dparameters_t parameters;
opj_set_default_decoder_parameters(&parameters);
+#ifdef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG
+ parameters.flags = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG;
+#endif
/* Configure the event manager to receive errors and warnings */
opj_event_mgr_t event_mgr;