Bug 32102 - Create A1 instead of A8 image in imagemask
Summary: Create A1 instead of A8 image in imagemask
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 06:14 UTC by Adrian Johnson
Modified: 2010-12-14 02:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
use A1 instead of A8 in drawImageMask (1.97 KB, patch)
2010-12-04 06:14 UTC, Adrian Johnson
Details | Splinter Review
use A1 instead of A8 for imagemask (2.74 KB, patch)
2010-12-13 14:39 UTC, Adrian Johnson
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Johnson 2010-12-04 06:14:14 UTC
Created attachment 40801 [details] [review]
use A1 instead of A8 in drawImageMask

Poppler is using an A8 image surface to store an A1 mask. The cairo PDF surface can use an A1 mask a lot more efficiently as it can output a stencil mask instead of a softmask.
Comment 1 Albert Astals Cid 2010-12-13 05:50:37 UTC
I'm a bit concerned about WORDS_BIGENDIAN, where is supposed to be defined?
Comment 2 Adrian Johnson 2010-12-13 13:41:41 UTC
(In reply to comment #1)
> I'm a bit concerned about WORDS_BIGENDIAN, where is supposed to be defined?

I found it is defined by autoconf. I had a look to see if there is a cmake equivalent. According to the cmake manual something like this should work:

  test_big_endian(WORDS_BIGENDIAN)

but as I don't have any big endian machines I can't test it.
Comment 3 Adrian Johnson 2010-12-13 14:39:10 UTC
Created attachment 41095 [details] [review]
use A1 instead of A8 for imagemask

Updated patch with autoconf and cmake tests for WORDS_BIGENDIAN.
Comment 4 Albert Astals Cid 2010-12-13 22:51:47 UTC
@Carlos: Tested the pdf rendering (to png) and the results are the same as expected.
Comment 5 Carlos Garcia Campos 2010-12-14 02:57:06 UTC
Pushed to git master, thanks Adrian!


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.