I have bmp (or jpg) file. I need to convert it to dds file programmatically (I can use C++, C# with or without .NET; I can try any other language if I would see some clues in it)
I know that there are software that do this, but I need it to integrate into my programm, this should be a part of a longer manipulations on my application.
BTW, my question is: 1) Are there any opensource program that does this, so I can look into the code of it? 2) Are there any tutorials found somewhere in web that can help me to write this code?
I could not found any helpfull information.
Thank you!
I'm sure there are standalone converters you can use calling them via command line, if you need a programmatically solution the easiest way I may think about is to use built-in XNA classes to do the job. Because XNA handles all these file formats you can open source .bmp and then save it back to .dds (using the Texture class):
Things changed with XNA 4.0 (these methods have been removed), try the DDSLib to write and Texture2D to read:
See linked pages for more details and examples. By the way you can't have C# without .NET!