[Bf-committers] Preview Icon alpha

Antony Riakiotakis kalast at gmail.com
Sat Apr 26 16:33:11 CEST 2014


Hi,

I am in the process of updating the paint brush icons [1] and I have been
looking at the icon preview code, file interface_icons.c, function
icon_draw_size.

There are some caveats in the code:

First, we assume premultiplied images, while the pngs used from our
data_to_c conversions use straight alpha.

The second thing is that it looks as if we do not enable blending for icon
previews, which would be cool (new set of icons would work nice if used
with transparency, for instance, as would custom brush icons, I understand).

For the first issue I can convert the images to premultiplied space
externally but then other png's might bite us similarly. Maybe the best
would be to premultiply during data_to_c conversion? For the second issue,
I'm not sure if enabling blending could bite us in other icon rendering
cases.

Thoughts?

[1] https://developer.blender.org/T37960


More information about the Bf-committers mailing list