Comment 14 for bug 109995

Revision history for this message
Franck (alci) wrote :

Nickolay Shmyrev (Evince developper) recently submitted a "quick and dirty" patch to this specific problem.

See https://bugs.freedesktop.org/show_bug.cgi?id=10881#c4
I would like to test it, but I really have no clue how to do it...
Could someone help me on this ? (ie provide a patch poppler lib, or better teach me how to do it myself (at least some pointers))

The patch is :

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 26b8010..f5e5c9a 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1609,6 +1609,9 @@ void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
   cairo_matrix_t matrix;
   int is_identity_transform;

+ if (width == 1 && height == 1)
+ return;
+
   buffer = (unsigned char *)gmalloc (width * height * 4);

   /* TODO: Do we want to cache these? */