PNG supports keeping the color channels bellow the alpha. But there is no way from krita to enable this. For example. Create put an image into krita. Set an alpha channel/mask to full black. Export the image as png. Then open the image, and disable the alpha channel. The image comes out a single black (by default) color. What I expect is that the image should still be there. This is for use in game materials and shaders where you need access to all RGBA channels for blending etc... Example plugin for photoshop thats open source: http://www.fnordware.com/superpng/
That is probably because png and tga and so on don't save your layer; it saves the composed image. And at the composition phase, a pixel with alpha 0 gets all its color channels set to 0, if I remember correctly.
*** Bug 375879 has been marked as a duplicate of this bug. ***
Either as in the updated subject, or we should change all composite ops to not discard color data if the pixel is transparent. That, however, will likely cause a lot of performance loss and a lot of unforeseen issues.
Hi, Bronson! Exactly for the purpose of keeping alpha channel intact, we have a Split Alpha functionality: 1) Select the layer you would like to export 2) Right Click -> Split Alpha 3) Select new transparency mask, right click, Save Merged The resulting image will contain alpha data, and color data intact. I think we should add documentation about it
Okay, when saving the image with only one layer without any masks, the color data is saved correctly. I'm not sure if flattening the image every time is a good workflow though, so it is better to use the Split Alpha for that. Here is a draft for the Krita Manual: https://phabricator.kde.org/D20782 I will downgrade the bug to 'wish' category now. Perhaps one day we will invent some nicer workflow for this.