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

Add support for DDS files #352

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Raghav-B
Copy link

@Raghav-B Raghav-B commented Dec 28, 2024

Added support for DDS files. Have been really enjoying JPEGView but it's not able to open .dds files which are common in game development workflows.

Closes #326.

Overview

  • I tried to keep the implementation lightweight and chose not to include external libraries.
  • I chose not to use DirectXTex for DDS support as I felt it would add too much bloat to the project.
  • I instead adapted the Block Compression implementation BcnDecode.c from the Python Pillow project from here.

Limitations

  • Since I didn't use DirectXTex, I don't think I cover 100% of DDS subformats, especially more niche ones. However, I used Pillow's DDS support as a guideline and manually ensured parity between JPEGView and all .dds files Pillow uses in its tests
    • I believe this should cover the vast majority of dds files

This is my first PR here - do let me know if I'm missing anything else that needs to be added when supporting additional file formats.

TODO

  • Check if DDS file thumbnail previews work in windows explorer
  • I'll try and add support for the dds variants listed here. Will probably use the test media provided here to validate my implementations.

Current supported DDS formats are in parity with Python Pillow
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

Successfully merging this pull request may close these issues.

DDS format support
1 participant