[poppler] [RFC] Add option to keep alpha channel to Qt frontends
Albert Astals Cid
aacid at kde.org
Sun Jul 12 09:14:21 PDT 2015
El Dimecres, 8 de juliol de 2015, a les 17:52:18, Adam Reichold va escriure:
> Hello,
>
> Am 07.07.2015 um 23:10 schrieb Albert Astals Cid:
> > KeepAlphaChannel = 0x00000080
> > ///< Do not compose with the paper color \since 0.34
> >
> > Does this really have anything to do with not compositing the paper color?
> > I'd say the paper color is still very much taken into account, it's just
> > that the alpha is not always opaque if you pass that option, no?
>
> As the paper colour that is passed to the Splash output device is
> actually NULL, I would say that is not taken into account. Also note
> that even though Splash renders colour data and alpha channel
> separately, consumers can still access it via the separate pointers. It
> is only the Splash::compositeBackground method which currently blends
> the colour data and flattens the alpha channel afterwards.
>
> Hence IMHO the functional difference is really not composing with the
> paper colour, that we then transfer the alpha channel into the fourth
> component of the XBGR8 data is just an extra (and could for example also
> be done by the Qt frontends if desired).
Then maybe we can change the flag name to be IgnorePaperColor?
The wording you suggest and how one is disconnected from the other makes me a
bit unforncortable.
>
> > Also the last commit makes me a bit scared to be honest, is very easy to
> > make a mistake in one of those things, I'll put it in my todo but as you
> > know it's long, would appreciate if someone else reviewed/regtested it.
>
> I very much agree and could live without the last commit which only
> improves things minimally since the RGB8 and KeepAlphaChannel changes
> are useful improvements already. So maybe its best to let the last
> commit be for the time being and the changes stew for a few releases?
Makes sense to me, shall i just pick the three first commits from splash-no-
background-v4.patch ?
Cheers,
Albert
>
> Best regards, Adam.
More information about the poppler
mailing list