[cairo] Image Format / Pre-Multiplied Alpha Related Feature Request

William Kappler wekapple at ncsu.edu
Wed Jan 27 23:39:17 PST 2016


The issue is not any external format like OpenEXR, but that so far as I am
aware, there is no way to extract non-pre-multiplied information out of
Cairo. This is something I need to do. Were Cairo able to output to
OpenEXR, that would essentially be one of the options I listed that would
resolve this problem. It is, so far as I can tell, not capable of that.

If I must justify the need for this feature, which a Google search has
revealed numerous people talking about regarding Cairo, it is simply that I
am intending to use Cairo's output in far more complex operations than
simple alpha-blends. Pre-multiplied alpha conveys little to no benefit
when, for example, using rayraced transparency.

It does, however, have all the negative impacts I outlined in my first
email - the primary concern of mine being the loss of color range, should
the texel be used in any way other than a simple alpha-blend.


:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
William E. Kappler II
LinkedIn <https://www.linkedin.com/in/williamkappler> · Blog
<http://williamkappler.blogspot.com/> · Project Website
<https://github.com/WilliamKappler/onathacar/wiki>

On Thu, Jan 28, 2016 at 12:15 AM, Lawrence D'Oliveiro <
ldo at geek-central.gen.nz> wrote:

> On Wed, 27 Jan 2016 22:25:42 -0500, William Kappler wrote:
>
> >    - Most libraries, shaders, and users/programmers expect textures
> > in 3D contexts to be non-pre-multiplied.
>
> Premultiplied alpha is the usual convention for rendering and
> compositing in both 2D and 3D
> <
> http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Image_Transparency
> >.
>
> Why premultiplied alpha? <http://keithp.com/~keithp/porterduff/>
>
> So if you want to reuse a rendered image in a context which does not
> understand premultiplied alpha, you will have to convert it.
>
> If you care about image quality, you will maintain your assets in a
> floating-point format like OpenEXR, which normally uses premultiplied
> alpha anyway.
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20160128/6a595076/attachment.html>


More information about the cairo mailing list