MilesFox92 Posted July 28 Share Posted July 28 Hello. I need to open .dds files of texture from Flatout 2, but it only allows me to open them in paint.net 3.5.11. On newer/latest versions it always gives me this error: Exception: System.FormatException: The DDS file is invalid. at DdsFileTypePlus.DdsNative.Load(Stream stream, DDSLoadInfo& info) in D:\Dev_projects\DdsFileTypePlus\DdsNative.cs:line 57 at DdsFileTypePlus.DdsReader.Load(Stream input, IServiceProvider services) in D:\Dev_projects\DdsFileTypePlus\DdsReader.cs:line 30 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 495 at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 495 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Fundamentals\Functional\Func.cs:line 58 Is there any way to fix that in latest version and not hop between old and new paint.net-s? Here's one of dds files for example: https://drive.google.com/file/d/1EaiJrKMvIbP2rUccKVnGs2mJL4mZsRDo/view?usp=sharing (couldn't attach it because of file size) Quote Link to comment Share on other sites More sharing options...
null54 Posted July 28 Share Posted July 28 That file has the DDS_PIXELFORMAT size is set to 24 bytes when it should be 32, whatever tool created it is writing invalid DDS files. Edit: I forgot that the DDS format includes the main image in the mipmap field count, so 11 mipmaps in a 1024x1024 pixel file is the expected number. 1 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 29 Share Posted July 29 Does this happen with all of the DDS images in Fallout 2? (wait, doesn't FO2 predate DDS?) @null54, how feasible/reasonable would it be to support these incorrectly formatted files? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
null54 Posted July 29 Share Posted July 29 1 hour ago, Rick Brewster said: Does this happen with all of the DDS images in Fallout 2? (wait, doesn't FO2 predate DDS?) The game is FlatOut 2, some kind of demolition derby racing game. I downloaded a few mods for the game from moddb to investigate this issue, and many of the modded DDS images have the DDS_PIXELFORMAT issue I mentioned above. Fallout 2 uses its own custom image formats, not dds. 1 hour ago, Rick Brewster said: how feasible/reasonable would it be to support these incorrectly formatted files? It would be simple to patch the header size issue, it is just one line of code to modify. It turns out I was wrong about the mipmap issue. I had forgotten that the DDS format includes the main image in the mipmap field count, so 11 mipmaps in a 1024x1024 pixel file is the expected number. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
null54 Posted July 29 Share Posted July 29 This issue has been fixed in DDSFileTypePlus version 1.12.1. 2 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Solution Rick Brewster Posted July 29 Solution Share Posted July 29 Oh right, Flatout 2. I was reading too fast Thanks for fixing so quickly! @MilesFox92, you can install the updated DDS plugin over here or you can wait for the v5.0.8 update of Paint.NET which will include it. Should be out soon. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
MilesFox92 Posted July 30 Author Share Posted July 30 Thank you a lot! Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.