开发者

I need to write a .DDS file cross-platform, can someone point me to example?

开发者 https://www.devze.com 2022-12-21 21:43 出处:网络
I need to create a .DDS file with code that runs on both OSX and Windows. Although the format doesn\'t look difficu开发者_如何学Clt, I\'d still like an example of writing the file. Note I don\'t need

I need to create a .DDS file with code that runs on both OSX and Windows. Although the format doesn't look difficu开发者_如何学Clt, I'd still like an example of writing the file. Note I don't need to read it, just write it.

C or C++ and RGBA bitmap.


I finally resorted to written a RAW file, and using GraphicConvertor (mac) to read it and write the DDS file. I think Photoshop can do it too. RAW files are simply RGB or RGBA or similar formats written straight to a binary file. Then in the reading application you tell it the dimensions so it can read it in. Then you export to whatever. Not a perfect solution but it worked for what I needed.

0

精彩评论

暂无评论...
验证码 换一张
取 消