<div dir="ltr">Hi,<div><br></div><div style>I made some tests and read most of the painting code but did not had time to code a fix yet.</div><div style><br></div><div style>Here are my finding so far.</div><div style><br>
</div><div style>Create an new image in the uv/image editor (opaque black)</div><div style>Paint the lower half of the image in white (still no alpha)</div><div style>Use the &quot;Erase Alpha&quot; paint mode to make the whole image transparent.</div>
<div style><br></div><div style>--&gt; In the view (RGB whit no alpha) it displays all black, the white and transparant part of the image is lost.</div><div style>This makes me think that even the image is byte with straight colors, not colormanged  and need to be displayed with straight colors it is somehow modified.</div>
<div style><br></div><div style>Then painting white or black stroke over the image works ok, or not depending if you paint white on white or white on black or the other way around.</div><div style><br></div><div style>Images are better than a 1000 words:</div>
<div style><br></div><div style><a href="http://www.pasteall.org/pic/42616">http://www.pasteall.org/pic/42616</a><br></div><div style><a href="http://www.pasteall.org/pic/42617">http://www.pasteall.org/pic/42617</a><br></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">I am patching now, but I cannot promess I will have time to debug :( </div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/29  <span dir="ltr">&lt;<a href="mailto:sergey.vfx@gmail.com" target="_blank">sergey.vfx@gmail.com</a>&gt;</span><div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 2012/12/29 22:41:44, <a href="http://xavier.thomas.1980_gmail.com" target="_blank">xavier.thomas.1980_gmail.com</a> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; However, byte buffers behaves quite fuzzy. When i do a stroke with<br>
</blockquote>
white<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; brush on complete transparent image, i should see the whole stroke<br>
</blockquote>
being<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; white in RGB display mode, but it fades up to darkish colors to the<br>
&gt; sides of brush. Converting pixels from straight-byte to premul-float<br>
</blockquote>
in<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; IMB_rectblend and using IMB_blend_color_float doesn&#39;t give correct<br>
&gt; result here.<br>
</blockquote>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Darkish colors in the semitransparent areas is often a sign of having<br>
premultiplied colors by alpha twice or more.<br>
</blockquote>
<br></div></div>
I know this and it doesn&#39;t seem to be this case. If you&#39;ll try the patch<br>
you&#39;ll notice that blending is much more &quot;steppy&quot; than just multiplying<br>
alpha twice. It could be extra premul, but there seems to be some other<br>
issue involved here.<br>
<br>
<a href="https://codereview.appspot.com/7018048/" target="_blank">https://codereview.appspot.<u></u>com/7018048/</a><br>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div>