aimylios / rpms / calibre

Forked from rpms/calibre 4 years ago
Clone
Blob Blame History Raw
--- calibre/src/calibre/ebooks/pdf/images.cpp	2011-07-22 18:17:44.000000000 +0200
+++ calibre/src/calibre/ebooks/pdf/images.cpp	2011-09-09 13:30:26.000000000 +0200
@@ -126,7 +126,13 @@ void XMLImages::add(GfxState *state, Obj
 
     if (img->type == jpeg) {
         int c;
+
+#if POPPLER_CHECK_VERSION(0, 17, 3)
+        str = str->getBaseStream();
+#else
         str = ((DCTStream *)str)->getRawStream();
+#endif
+
         str->reset();
 
         // copy the stream
--- calibre/src/calibre/ebooks/pdf/images.h	2011-09-09 13:35:14.000000000 +0200
+++ calibre/src/calibre/ebooks/pdf/images.h	2011-09-09 13:35:27.000000000 +0200
@@ -12,6 +12,7 @@
 #include <splash/SplashBitmap.h>
 #include <png.h>
 #include <jpeglib.h>
+#include <glib/poppler-features.h>
 #include "utils.h"
 
 using namespace std;