I'm working with multiple images that need to be compressed using the DXT/S3TC format (specifically DXT5).
Does anyone know of a DXT compression implementation (preferably in C#, or using the .Net framework) that provides real-time compression? My application will be compressing 10-20 512x512 images at a time, so I'd like a relatively speedy implementation, if there is one. I've searched and searched but cannot seem to find one, and for some reason I can't wrap my head around the DXT5 format enough to write my own implementation.
I know the XNA framework supports DXT compression. Would anyone happen to know if it's reasonably fast? Would people need to install XNA in order to use my application?
Thanks for your help. :)
I don't know about C#, but there are a few implementations in the C++ NVIDIA texture tools: a quick one and an optimal one (search for compressDXT5A
). I believe the implementation there is decomposed into a "DXT1" step for the color channels and a "DXT5A" step for the alpha channel.
XNA would need to be installed to use the XNA framework, yes. If you can guarantee that DirectX is installed, you might be able to use SlimDX to get DirectX's routines for DXT5.