Export without premultiplied alpha?
Hello,
I used Inkscape in the recent years for great works and it keeps better and better. So at first big thanks to all developers that made it possible.
But now to my question. ;-) Does Inkscape support image export (export to PNG) without premultiplied alpha? In a recent project I needed images with fairly high transparency, but with premultiplied alpha the colors inside this image regions are really suffering. As an example you could try to export a highly transparent rainbow open it with Gimp and remove the alpha channel. It should be clearly visible the the colors are strongly quantized.
As long the image is just composited 1:1 over another image this is no problem, but in other scenarios it starts to give problems, since the color information is missing.
Are there any plans to enable true RGBA (all seperated channels) for at least the export? Currently i have to export two images. RGB for the colors and a duplicate in graytones for alpha that i then combine to true RGBA to avoid the problem.
Best Wishes Tobias Oelgarte
On 23-04-12 07:51, Tobias Oelgarte wrote:
Hello,
I used Inkscape in the recent years for great works and it keeps better and better. So at first big thanks to all developers that made it possible.
But now to my question. ;-) Does Inkscape support image export (export to PNG) without premultiplied alpha? In a recent project I needed images with fairly high transparency, but with premultiplied alpha the colors inside this image regions are really suffering. As an example you could try to export a highly transparent rainbow open it with Gimp and remove the alpha channel. It should be clearly visible the the colors are strongly quantized.
I understand your problem, but I'm afraid Inkscape does not support this, and probably won't for some time. Before the switch to Cairo we did have some code in there to do things like this, but with the switch to Cairo we lost that as well. (Which is not meant to imply that this switch was a bad thing, far, very far, from it.) Fact is, it is /much/ harder to do things with non-premultiplied alpha, than with premultiplied alpha.
Also, using non-premultiplied alpha is only a partial solution at best. As soon as transparencies become small, you will get quantization artifacts, as the "mixing ratio" of the colors will suffer (badly).
And if you need the non-transparent colors anywhere, then I would recommend simply exporting the non-transparent colors. If the transparent colors are showing artifacts (as in: visible in the png exported by Inkscape), then this might be a bug (or at least something to be improved) and I'd like to see them.
participants (2)
-
Jasper van de Gronde
-
Tobias Oelgarte