Skip to main content
GameDev.net gamedev.net
🔒 Locked

DDS and JPEG

Started by Lightrocker Nov 30, 2001 at 8:01 AM 3 replies 850+ views
Original Post
Lightrocker
Lightrocker
I need one function or class with the ability to write all DirectX 8 texture formats to a DDS file. The function D3DXSaveTextureToFile() is able to write 2D, cube and volume textures, but without alpha channel, which I need. The NVidia examples, which I know about, have also only incomplete support. Also I need another, single function to decompress JPEG files with alpha channel in memory. I use the Intel JPEG Library to compress it, but I don''t want to include the DLL of it, when my engine only decompress JPEGs. Does anybody know some good links to solve my problems?
xyzzy00
xyzzy00
Actually, I believe D3DXSaveTextureToFile *can* save alpha data to DDS files. Try it =)

xyzzy
Lightrocker
Lightrocker
I tried it again and now it works fine with D3DXSaveTextureToFile(). Maybe it was the prerelease of DirectX 8.1 SDK, which did not supported alpha channel. Or I had made a mistake.

But still I need a solution to decompress JPEGs using an alpha channel without external libraries.
Biere et punk
Biere et punk
Jpegs do not store alpha channels

all jpgs are 24-bits, you cannot save jpg as 32 bits

Biere et punk
Lightrocker
Lightrocker
I am able to store and reload JPEGs with alpha channel if I use the Intel JPEG library. So it has to be also possible by a single loading function.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.