<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for the suggestion.<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I'm not dealing with a single color, but that did give me an idea that perhaps I could render color without alpha and then alpha on its own, and just blend the data together on my end. I'm not sure if that will work or not, I need to play with it.<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">A floating point format would be great, though, if that's possible at some point in the future. It would potentially have utility beyond my specific usage.<br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font size="1"><span style="font-family:trebuchet ms,sans-serif"><br>:-:-:-</span></font><span style="color:rgb(68,68,68)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><span style="color:rgb(102,102,102)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><span style="color:rgb(153,153,153)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><span style="color:rgb(204,204,204)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><span style="color:rgb(238,238,238)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><span style="color:rgb(243,243,243)"><font size="1"><span style="font-family:trebuchet ms,sans-serif">:-:-:-</span></font></span><br><span style="font-family:verdana,sans-serif">William E. Kappler II<br><font size="1"><a href="https://www.linkedin.com/in/williamkappler" target="_blank">LinkedIn</a> · <a href="http://williamkappler.blogspot.com/" target="_blank">Blog</a> · <a href="https://github.com/WilliamKappler/onathacar/wiki" target="_blank">Project Website</a></font></span></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Jan 28, 2016 at 3:11 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Non-premultiplying of the destination buffer would involve changing all the compositing math.<div><br></div><div>For instance OVER changes from A+B(1-a) to (A+Bb(1-a))/(a+b-ab)</div><div><br></div><div>This almost always is more complicated, which is why premultiplied is almost always used in rendering and compositing. Also in most cases the background image has to be stored in floating point, as the multiply and division here will get you the same inaccuracy you are having with premultiplied.<br></div><div><br></div><div>If your Cairo rendering is a solid color (ie paths and fill and fonts, but all using the same color) then you can get a non-premultiplied version by saving only the alpha channel and replacing the color with the solid color. This may cover a lot of the uses you want for texture maps. You may also be able to bleed out the color from alpha=1 pixels into neighboring transparent pixels, I have used this as a method to remove premultiplied inaccuracy.</div><div><br></div><div>A floating-point format for Cairo would be a good solution however, as it would be accurate, whether or not it is premultiplied.</div><div><br></div><div><div>Non-premultiplied source images are supported in most cases by choosing the correct compositing operations and using the alpha as a mask.</div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 1:40 AM, Lawrence D'Oliveiro <span dir="ltr"><<a href="mailto:ldo@geek-central.gen.nz" target="_blank">ldo@geek-central.gen.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Thu, 28 Jan 2016 02:39:17 -0500, William Kappler wrote:<br>
<br>
> The issue is not any external format like OpenEXR, but that so far as<br>
> I am aware, there is no way to extract non-pre-multiplied information<br>
> out of Cairo.<br>
<br>
</span>If you really wanted to, you could trade off resolution for bit depth<br>
by doing oversampling.<br>
<div><div>--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a></div></div></blockquote></div><br></div>
</div></div><br>--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br></div>