tannerhelland / PhotoDemon

A free portable photo editor focused on pro-grade features, high performance, and maximum usability.
https://photodemon.org
Other
1.39k stars 203 forks source link

[Feature request] - DDS file support #376

Open CasualDev242 opened 3 years ago

CasualDev242 commented 3 years ago

Currently I'm still using Photoshop because I work with DDS files in game development. I would be very thankful if you'd add support for DDS files, especially the new BC texture formats out there. I'm sure many others would appreciate this too.

tannerhelland commented 3 years ago

Thank you for suggesting this, @CasualDev242 ! I'll start researching what it would take to add DDS support to the project.

Do you have any examples of software that does DDS support well? (It's helpful to see how other devs have tackled a feature before I attempt it myself.)

CasualDev242 commented 3 years ago

Well, there's this Photoshop plugin from Intel: https://www.intel.com/content/www/us/en/developer/articles/tool/intel-texture-works-plugin.html They have an app that utilizes their DDS images in some way here: https://github.com/GameTechDev/ISPCTextureCompressor It also sounds like GIMP might have offical DDS support now, you could check them out: https://www.gimp.org/source/

P-lauski commented 3 months ago

+1 .DDS support would be huge. Another plugin for photoshop is the nvidia texture tools https://developer.nvidia.com/texture-tools-exporter

0xC0000054 commented 2 months ago

I maintain the Paint.NET DDS plugin, it uses Microsoft's DirectXTex library. The Paint.NET plugin uses a fork of DirectXTex with custom I/O methods that allow me to read directly from a .NET Stream object, but the DirectXTex API supports I/O with files or memory buffers.

DirectXTex is a C++ static library so you would have to write a wrapper DLL to expose its API as C-compatible. An alternative would be to call the executables that ship with DirectXTex, but you would still have the problem that DirectXTex only provides x64 and ARM64 binaries in their GitHub releases.