[Bf-committers] Problems with premultiplied alpha channel in 8 bit images

Matt Ebb matt at mke3.net
Wed Feb 9 21:48:05 CET 2011

On Thu, Feb 10, 2011 at 7:27 AM, gespertino at gmail.com
<gespertino at gmail.com> wrote:
> I use PNG files a lot for my work. I found that 8-bit RGBA files
> (non-linear, with premultiplied alpha channel) saved from the
> compositor have some sort of alpha contamination in the
> semi-transparent pixels that makes them imposible to compose correctly
> in other than Blender's compositor.

Troy mentioned this to me a bit earlier but I didn't have a chance to
look into it deeply yet. One thing that comes to mind though, is that
does this only happen with PNG files? or TIFFs as well?

According to the PNG spec [1], alpha is meant to be saved
un-associated (un-premultiplied). If Blender is saving premultiplied
alpha in a PNG then it's in violation of the spec, and I'm wondering
if this may cause problems later on.

It would be good to see some testing with different image formats.



[1] http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html -> 12.8

More information about the Bf-committers mailing list