Creation of png files with alpha layer from directx
Hi i would like to know if it is possible to create png files with alpha layer from a texture in directx or slimdx,
I am exporting textures as png as using basemesh.tofile but the textures which originally was dds only exports the part of the dds that in the alpha channel is white, and the new png doesn´t have alpha layer
sorry i think i didn´t express myself well
Waht i try to mean is that i have dds textures allocated in directx.direct3d.textures, this dds has an alpha channel and when i try to save to a png file this texture i lost the alpha channel and it saves the texture like a png without alpha layer?
How can i conserve the alpha layer when i save dds texture to png using texture.tofile?
Waht i try to mean is that i have dds textures allocated in directx.direct3d.textures, this dds has an alpha channel and when i try to save to a png file this texture i lost the alpha channel and it saves the texture like a png without alpha layer?
How can i conserve the alpha layer when i save dds texture to png using texture.tofile?
Are you loading the DDS into a texture that doesn't have an alpha channel? What format is the texture that you're saving?
the original texture is a dxt5 with alpha channel and i am trying to save it as png.Aren´t there png with alpha channel?
Quote:Original post by jor1980PNG has alpha, yes. But the IDirect3DTexture9 you loaded the DXT5-format into might not. If you load an image with alpha into a texture that has no alpha, you'll lose the alpha information.
the original texture is a dxt5 with alpha channel and i am trying to save it as png.Aren´t there png with alpha channel?
Quote:Original post by jor1980Nope, the alpha channel is lost. Just as if you take a 32 byte file and save the first 24 bytes it's not possible to get the missing 8 bytes back.
Thank's for your answer, could i save it as png with alpha in anyway?or it is impossible
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement