Add support for more .dds texture compression formats.

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

Moff
Posts: 5
Joined: Wed Mar 29, 2023 10:12 pm

Add support for more .dds texture compression formats.

Post by Moff »

More specifically, BC4 and BC5 compression, which is fairly common in modern video games.

The problem i have is not just that XnView doesn't open .dds files in these formats, which is unfortunate, but i have other programs which can do that, but if you have XnView's browser set to only display image files, and then open a folder containing these .dds files, XnView would try to generate a thumbnail for them, fail, and then instead of showing them without a thumbnail, it will hide them altogether.

Which, if you use XnView to browse images instead of your os browser, like i do, it can get really confusing, as i might be looking through folders, searching for a certain file, and think "oh well, i guess the file's not here", when it is and it's just been hidden.

I really hope that support for those formats can be added in future releases, or at least implement some way to change the behavior i described above where failure to display a file with an extension of a known image format excludes it from the list of files shown to user.
User avatar
xnview
Author of XnView
Posts: 43700
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Add support for more .dds texture compression formats.

Post by xnview »

could you send me sample files?
Pierre.
Moff
Posts: 5
Joined: Wed Mar 29, 2023 10:12 pm

Re: Add support for more .dds texture compression formats.

Post by Moff »

Here you go. And here's a description of the formats: http://sv-journal.org/2014-1/06/en/inde ... ang=en#5-4
You do not have the required permissions to view the files attached to this post.
Moff
Posts: 5
Joined: Wed Mar 29, 2023 10:12 pm

Re: Add support for more .dds texture compression formats.

Post by Moff »

Bumping cause i only now realized that XnView actually does support both BC4 and BC5, it just doesn't recognize FourCCs that some of the encoders write. It seems to expect FourCC for those formats to be "BC4U" and "BC5U", while they could also be "ATI1" and "ATI2" respectively (https://github.com/Microsoft/DirectXTK/ ... tureLoader), as they were in the examples i attached. I tried replacing 4cc in a hex editor, and the file opens up in XnView without any issues.
It you could add a check for those other FourCCs, that would probably be enough to resolve the issue.