<div dir="ltr">The double can come from the painting too.<div><br></div><div style>If you paint on an fully transparant image, what would be the background without taking alpha into consideration?</div><div style>Black I suppose (If white than the problem would be present when painting black)</div>
<div style>Now you paint white on it with a brush with soft-edges.</div><div style>If the painting code mix the white (the color you are painting with) with the black (the supposed background color that we cannot see) on the edges of the brush.</div>
<div style>Than you premultiply for display -&gt; blak border.</div><div style><br></div><div style>The painting code should paint full white even on the border of the brush and should not blend the painting color with the background, but this only when painting on area that where fully transparant befor painting. For areas that where opaque already before painting the  blend should occur. But for it to work properly in any case -&gt; the painting code should be modifed and take the &quot;old&quot; alpha value into account for modifying colors.</div>
<div style><br></div><div style>That&#39;s where I think the problem comes from anyway.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/29 Xavier Thomas <span dir="ltr">&lt;<a href="mailto:xavier.thomas.1980@gmail.com" target="_blank">xavier.thomas.1980@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


However, byte buffers behaves quite fuzzy. When i do a stroke with white<br>
brush on complete transparent image, i should see the whole stroke being<br>
white in RGB display mode, but it fades up to darkish colors to the<br>
sides of brush. Converting pixels from straight-byte to premul-float in<br>
IMB_rectblend and using IMB_blend_color_float doesn&#39;t give correct<br>
result here.</blockquote></div><br></div></div><div class="gmail_extra">Darkish colors in the semitransparent areas is often a sign of having premultiplied colors by alpha twice or more.<br></div></div>
</blockquote></div><br></div>