Bug 22216 - problem with imagemasks
Summary: problem with imagemasks
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-10 16:38 UTC by William Bader
Modified: 2009-08-07 10:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
rendering from evince 2.20.2 using poppler 0.6.2 (cairo) (110.06 KB, image/gif)
2009-06-10 16:41 UTC, William Bader
Details
correct rendering with ghostscript (109.92 KB, image/gif)
2009-06-10 16:42 UTC, William Bader
Details
example pdf to show the imagemask problem (570.64 KB, application/force-download)
2009-06-10 16:44 UTC, William Bader
Details
possible misorder of interpolate argument (1.14 KB, patch)
2009-06-29 03:52 UTC, William Bader
Details | Splinter Review
screen capture with -level1sep (48.44 KB, image/gif)
2009-08-07 10:23 UTC, William Bader
Details

Description William Bader 2009-06-10 16:38:19 UTC
I have a pdf with an image mask that poppler does not handle correctly.
The file is a real estate ad that should have the faces of six realtors at the bottom.  All six faces show with Acrobat Reader and with ghostscript, but evince, xpdf and pdftops drop three of them.  The three faces that disappeared on the bottom of the ad are photoshop psd files.  The other three were tiffs.  The original pdf was created with Adobe InDesign on a Mac. I think that it is drawing an imagemask through a pattern and that Gfx::doImage() does not support masks with DecodeParms and Filter objects.  If I edit the pdftops output and modify pdfImM1 to use "image" instead of "imagemask" (and also changing the true/false polarity argument to 1 bit/pixel), the three missing faces show as black shadows in white boxes.  I think that it is losing the image that should be masked.  I tested ghostscript's pdf2ps to see what it produced.  It worked for Level 2 output, but it had problems with Level 1 output.  The ad is just black and white, but it is possible that the images that do not show use color.  I reported the gs issue as http://bugs.ghostscript.com/show_bug.cgi?id=690297
Comment 1 William Bader 2009-06-10 16:41:56 UTC
Created attachment 26647 [details]
rendering from evince 2.20.2 using poppler 0.6.2 (cairo)

I marked the spaces with the missing faces.  evince also produces several messages "cairo context error: NULL pointer"
Comment 2 William Bader 2009-06-10 16:42:39 UTC
Created attachment 26648 [details]
correct rendering with ghostscript
Comment 3 William Bader 2009-06-10 16:44:00 UTC
Created attachment 26649 [details]
example pdf to show the imagemask problem
Comment 4 Adrian Johnson 2009-06-11 06:27:16 UTC
Testing with git master:

 - the NULL pointer error is fixed
 - All faces appear but the first and fourth face has a white background instead of black 
 - Problem only occurs with cairo. Looks correct with splash.
Comment 5 William Bader 2009-06-29 03:52:08 UTC
Created attachment 27218 [details] [review]
possible misorder of interpolate argument

pdftops from a git copy on June 26 has a regression from a git copy of June 11.  The faces show, but the prices are missing under four of the houses.
I suspect that the change is related to the new interpolation argument.  I found two places where I think that it was interchanged with another boolean argument (which means that it compiles without producing a warning), although fixing those did not have any effect one the problem.
Comment 6 Albert Astals Cid 2009-06-29 12:57:57 UTC
Commited, thanks for noticing the swapping!
Comment 7 Albert Astals Cid 2009-06-29 13:00:15 UTC
Btw i don't see any regression on the gs using current git master
Comment 8 Carlos Garcia Campos 2009-08-07 06:27:16 UTC
Fixed in git master. 
Comment 9 William Bader 2009-08-07 10:23:20 UTC
Created attachment 28427 [details]
screen capture with -level1sep

pdftops (copied from git 7 Aug 09) works with -level2sep but it still drops some of the images with -level1sep


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.