[poppler] [Poppler-bugs] [Bug 22473]

Albert Astals Cid aacid at kde.org
Sat Jun 27 04:18:17 PDT 2009


A Dissabte, 27 de juny de 2009, James Cloos va escriure:
> >>>>> "Albert" == Albert Astals Cid <aacid at kde.org> writes:
>
> Albert> Well i did it by empirical testing, get the pdf remove the
> Albert> /Matte[0 0 0] entry of the object 51 and see how the left "More
> Albert> Text Here TBD" in Adobe Acrobat is rendered with the exact same
> Albert> color we get in poppler.
>
> My compile is a bit long in the tooth (about 60 days); there must have
> been a relevant change in that time; I do not see a difference from
> overwriting /Matte [0 0 0] with spaces.

What changes is what Adobe Acrobat renders, not what us render.

Still don't understand why if c′ = m + α × (c − m) with m = 0

Albert

>
> Albert> Yep, looking at the formula for Matte color calculation it seems
> Albert> that Matte 0 0 0 should not affect rendering at all, Leonard can
> Albert> you shed some light here?
>
> >> The reply was, of course, supposed to go to bugz-d rather than the
> >> list.  But since it was wrong, I’m not going to correct that....
>
> Albert> ¿¿??
>
> I meant that I was trying to post a comment to the bug via that email;
> the reply-to munging on the poppler-bugs list means that, to do that,
> I have to manually edit the To: in the reply.  With the last part I
> meant that, since I can now see the difference the bug reported saw,
> the first paragraph of my reply was incorrect and therefore there was
> no point in re-sending the post to bugzilla.....
>
> >> So, to handle Matte, the ref says the SMask’s Width and Height have
> >> to match the primary image’s,
>
> Albert> What the spec doesn’t say is what one should do if they are not
> Albert> the same :-/
>
> Indeed.  The Right Thing To Do, given a pre-multiplied soft mask with
> a different pixel-size than the image it applies to, is complicated at
> best.  (Except, of course, when the main image is an integer×integer
> multiple of the mask’s size, where resizing the mask to match the main
> image is trivial.)
>
> Incidently, for those reading along, c′ = m + α × (c − m) ımplies that
> as α varies ∈ [0,1], c′ varies ∈ [m,c].
>
> So dealing with non-conforming PDF files will be the only difficult part.
>
> >> Should OutputDev::drawSoftMaskedImage() get another arg to pass the
> >> Matte array?  Or should it be added to the GfxImageColorMap object?
>
> Albert> C++ way is having GfxSoftMaskImageColorMap subclassing
> Albert> GfxImageColorMap that adds the Matte entry.
>
> Makes sense.  As you might guess, I’ve mostly been hacking in C of late.
>
> -JimC



More information about the poppler mailing list