-
Notifications
You must be signed in to change notification settings - Fork 667
New DDS decoder and encoder #2461
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
base: main
Are you sure you want to change the base?
Conversation
I fixed the error for |
Nice, |
I tested this branch and am very pleased. The current dds decoder is very limiting and confusing (returning errors like "The image format Excited to see this land. |
Resolves #2435
Resolves #2093
In this PR, I removed the old DDS decoder implementation and added a new decoder and encoder based on the
dds
crate.Decoder: The decoder now supports a bunch more formats, cube maps, rectangle decoding, and the ability to decode as a color format of the user's choosing.
Encoder: The encoder supports a selection of DDS formats, automatic mipmap generation, dithering, compression quality, and both header formats. If the user does specify a format, the encoder will automatically pick an uncompressed that can losslessly represent the image.
Only encoding single images (with optional mipmaps) is supported. Cube maps, texture arrays, and volumes are not. They could be in the future, but I don't see the need right now.
Changes:
dds
as a (private) dependency.dds
to power a new DDS de/encoder API forimage
. I made all new types, so nothing fromdds
is re-exported/used publicly.TODO:
DdsDecoder
andDdsEncoder
structs should have a lengthy doc comment explaining what they can do and how they are supposed to be used.