jpegview
jpegview copied to clipboard
DDS format support
Hey, just wanted request DDS support incase anyone might be interested in adding support for it. It's the last format I commonly use that I can't use jpegview for.
Hi @Anutim, not sure if this is still something you need, but I've opened a PR which adds DDS support for most sub-formats. Do let me know if this helps you out!
Hi @Anutim, not sure if this is still something you need, but I've opened a PR which adds DDS support for most sub-formats. Do let me know if this helps you out!
I don't have Visual Studio installed so can't test it as is, but that is fantastic!
And it's still definitely something I'd want. While Windows Explorer supports previews for DDS in general, it's still pretty awkward incase I have to zoom in on some detail. Explorer also doesn't support previewing 888/8888 etc, so would definitely be great with that too even if use of them is quite rare.
It would be great if you could test it out since the DDS build has been very useful for my work. Hmm, I could create a custom release on my fork with a binary you could download? Not sure if that's something you would be comfortable with however.
I'll take a look at it and merge it. I'm due for a release. I originally wanted to sign it but maybe I'll just leave it unsigned for one more release and just put the PRs in
Thanks for the contribution. I'm sorry I've been kinda MIA for a few months
No worries @sylikc, just happy to contribute to something I use daily! I've marked #352 as draft for now since I want to be thorough and ensure it works with all the DDS formats listed in the PR description. Will probably have it done over the weekend.
It would be great if you could test it out since the DDS build has been very useful for my work. Hmm, I could create a custom release on my fork with a binary you could download? Not sure if that's something you would be comfortable with however.
Yeah, sure, I'd appreciate it!
EDIT: Oh, I might as well wait actually if y'all are merging it soon.
Any update on this? @Raghav-B
Hi @Anutim . Sorry about the delay. Got caught up with work and also dealing with the fact that there are basically 100+ DDS subformats. I'm currently validating whether its worth supporting all of these before I decide to finalize the PR.
As mentioned in the PR, it can already handle all the DDS formats possible in Python Pillow. Perhaps this is enough for your use case - though do let me know if you have issues with certain files. Here is a release I've pushed out that matches the Pillow standard.
Hopefully I can add support for the other subformats and have this merged into the main repo soon...
EDIT: There is one known issue I identified with my existing implementation: I'm actually not adjusting the gamma when rendering non-sRGB DDS images - causing some to appear darker than expected. Will work on this fix as well.
Hi @Anutim . Sorry about the delay. Got caught up with work and also dealing with the fact that there are basically 100+ DDS subformats. I'm currently validating whether its worth supporting all of these before I decide to finalize the PR.
As mentioned in the PR, it can already handle all the DDS formats possible in Python Pillow. Perhaps this is enough for your use case - though do let me know if you have issues with certain files. Here is a release I've pushed out that matches the Pillow standard.
Hopefully I can add support for the other subformats and have this merged into the main repo soon...
Thank you, and take your time, I just wanted to check in.
Though, would it be possible to add a portable zip file in the release instead of an MSI?
Sure, I've just added it to the release @Anutim :)
As mentioned in the PR, it can already handle all the DDS formats possible in Python Pillow. Perhaps this is enough for your use case - though do let me know if you have issues with certain files.
So far it's working great with every format I've tried, and loads the files really fast as well! (Which is great, since speed is by far my favourite thing about jpegview)
So far it's working great with every format I've tried, and loads the files really fast as well! (Which is great, since speed is by far my favourite thing about jpegview)
That's awesome to hear :) Hope once its merged in it'll be useful for others as well
So far it's working great with every format I've tried, and loads the files really fast as well! (Which is great, since speed is by far my favourite thing about jpegview)
That's awesome to hear :) Hope once its merged in it'll be useful for others as well
It seems not to work properly on the following sample files: https://www.samplefiles.org/download-dds-sample-files/#download I can't figure it out...
It seems not to work properly on the following sample files: samplefiles.org/download-dds-sample-files#download I can't figure it out...
I'll try to dedicate some time by next weekend to look into this. Thanks for sending these files
Had a quick look at this just now @For0xLC . It seems like that website just downloads 0-byte empty files?
Had a quick look at this just now @For0xLC . It seems like that website just downloads 0-byte empty files?
![]()
Oh no, sorry, I pasted the wrong link yesterday. https://filesamples.com/formats/dds
Oh no, sorry, I pasted the wrong link yesterday. filesamples.com/formats/dds
Actually I am curious, how did you come across these failing cases? Do these sample files mirror DDS files you're using at present?
Oh no, sorry, I pasted the wrong link yesterday. filesamples.com/formats/dds
Actually I am curious, how did you come across these failing cases? Do these sample files mirror DDS files you're using at present?
I rarely work with DDS format. I was testing your code, and found these DDS files on Google Search. They can be viewed in Imagine, IrfanView and Windows Photo Viewer but JpegView. I've tried to debug it in VS2022, but I can't understand the code in BcnDecode.cpp...