Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibility to use lib to convert vector of pixel to DDS file ? #5

Open
OshidaBCF opened this issue Jul 24, 2024 · 2 comments
Open

Comments

@OshidaBCF
Copy link

As the title says it, is it possible to use the lib to convert an array of "raw" pixels into a DDS file ?

or is writing a dds way easier and i could code it myself easily ?

Great library, easy to use and straight up works

@spnda
Copy link
Owner

spnda commented Jul 25, 2024

Hi, thank you.

This library currently has no functionality for writing DDS files from raw pixels or blocks, but I don't think it should be to difficult to implement it yourself if you really need it. You could probably just use the library's implementation as a reference and read through the Microsoft DirectX documentation. However, you should be aware that most of the code that happens is to convert legacy header data to make it usable. You should always use the DX10 header for new files. Another option is also just to use something like KTX2 instead, which is a more modern file format for compressed textures.

Also, if you just have raw pixels perhaps just a raw container or writing the bytes directly might also suffice.

@OshidaBCF
Copy link
Author

Got it

i'll try to make something.

the reason i want to write dds is because my tool is a texture packer, and we want to support the most "common" formats, png bmp and dds

i managed to make something work with this lib (https://github.com/Pintea/save_dds/) but i changed a lot of things and i'm not happy with it (my changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants