Save compressed texture

Hi,
i have an application that uses 200 textures and more, now i’d like to try compressed textures on this application without making conversion by hand, in my application i can read from dds file compressed texture, does someone knows a way (or sample code) to make a compressed texture from a pixmap (and saved in a dds file)?
Thank you

Don’t know any of the details, but the DXT texture compression extension spec raised the question of whether users should be able to read back the compressed texture, and the answer was Yes.

So it sounds like there must be a way to read back the compressed texture from 3D memory.

Here’s a simple example:-

GLint imageFormat=0;
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &imageFormat);

GLint dataSize=0;
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &dataSize);

unsigned char* imageData = (unsigned char*)malloc(dataSize);
glGetCompressedTexImageARB(GL_TEXTURE_2D, 0, imageData);

BTW, isn’t OpenGL beautiful?
You should see the dx code…