Dear all,

The attached patch makes sure the mask of masked images are exported, thereby ensuring all image streams are saved to file.

Regards,
Timothy Lee
diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc
index 8aea9e7..a6af146 100644
--- a/utils/ImageOutputDev.cc
+++ b/utils/ImageOutputDev.cc
@@ -195,3 +195,22 @@ void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
     fclose(f);
   }
 }
+
+void ImageOutputDev::drawMaskedImage(
+  GfxState *state, Object *ref, Stream *str,
+  int width, int height, GfxImageColorMap *colorMap,
+  Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert) {
+  drawImage(state, ref, str, width, height, colorMap, NULL, gFalse);
+  drawImageMask(state, ref, maskStr, maskWidth, maskHeight,
+		maskInvert, gFalse);
+}
+
+void ImageOutputDev::drawSoftMaskedImage(
+  GfxState *state, Object *ref, Stream *str,
+  int width, int height, GfxImageColorMap *colorMap,
+  Stream *maskStr, int maskWidth, int maskHeight,
+  GfxImageColorMap *maskColorMap) {
+  drawImage(state, ref, str, width, height, colorMap, NULL, gFalse);
+  drawImage(state, ref, maskStr, maskWidth, maskHeight,
+	    maskColorMap, NULL, gFalse);
+}
diff --git a/utils/ImageOutputDev.h b/utils/ImageOutputDev.h
index 7583860..56c97a5 100644
--- a/utils/ImageOutputDev.h
+++ b/utils/ImageOutputDev.h
@@ -63,6 +63,17 @@ public:
   virtual void drawImage(GfxState *state, Object *ref, Stream *str,
 			 int width, int height, GfxImageColorMap *colorMap,
 			 int *maskColors, GBool inlineImg);
+  virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
+			       int width, int height,
+			       GfxImageColorMap *colorMap,
+			       Stream *maskStr, int maskWidth, int maskHeight,
+			       GBool maskInvert);
+  virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+				   int width, int height,
+				   GfxImageColorMap *colorMap,
+				   Stream *maskStr,
+				   int maskWidth, int maskHeight,
+				   GfxImageColorMap *maskColorMap);
 
 private:
 
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to