[poppler] color inversion for a mask image
Leonard Rosenthol
lrosenth at adobe.com
Thu Mar 29 15:04:07 PDT 2012
If you want to post the PDF, we can give you the EXACT thing to look for.
Otherwise, we're just guessing!
Leonard
On 3/29/12 11:12 PM, "Ihar `Philips` Filipau" <thephilips at gmail.com> wrote:
>Nope. Not it.
>
>I have tested it against the Splash: SplashOutputDev displays the
>image as it should be, HtmlOutputDev - not. In both cases, the Decode
>array indicates no inversion (and drawImageMask() is called with
>invert=false). There is something else in the GfxState which affects
>how the mask is painted.
>
>After looking at the Splash code which does it right, and imagining
>potential reimplementation say half of it in HtmlOutputDev, honestly,
>I'd rather live with the pdftohtml occasionally writing a monochrome
>image inverted. (ImageMagick's `convert -negate` does the job.)
>
>If the GfxState/etc had some sort of a way to dump the state - with
>some human explanations :) - so that it could be investigated with
>naked eyes, I might have tried to find it. But as it is, since I'm
>doing it on my spare time, it is pretty much unrealistic for me to
>find it. And for just one image - totally pointless, I have to admit.
>
>But thanks for your help anyway!
>
>P.S. Have tried couple of pdf2* alternatives - the same behavior.
>poppler's pdfimages likewise doesn't invert the image.
>
>On 3/29/12, Leonard Rosenthol <lrosenth at adobe.com> wrote:
>> I can't speak to the Gfxstate, but there are keys in the image
>>dictionary
>> (such as Decode) that relate to inversion.
>>
>> Leonard
>>
>> On 3/29/12 2:09 AM, "Ihar `Philips` Filipau" <thephilips at gmail.com>
>>wrote:
>>
>>>Hi All!
>>>
>>>I have encountered minor yet interesting problem. With the
>>>functionality I have recently added to pdftohtml, now also the mask
>>>images are extracted (as PNGs).
>>>
>>>In one document I have, one mask image is extracted with colors
>>>inverted: white is black, black is white. Yet, it is displayed by all
>>>the PDF viewers correctly.
>>>
>>>Is there any flag/etc in GfxState/etc which might be responsible for
>>>color inversion? the flag pdftohtml doesn't check yet?
>>>
>>>Thanks.
>>>_______________________________________________
>>>poppler mailing list
>>>poppler at lists.freedesktop.org
>>>http://lists.freedesktop.org/mailman/listinfo/poppler
>>
>>
>
>
>--
>Don't walk behind me, I may not lead.
>Don't walk in front of me, I may not follow.
>Just walk beside me and be my friend.
> -- Albert Camus (attributed to)
More information about the poppler
mailing list