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

DDS ImageClass is broken #15

Open
derplayer opened this issue Mar 11, 2019 · 1 comment
Open

DDS ImageClass is broken #15

derplayer opened this issue Mar 11, 2019 · 1 comment

Comments

@derplayer
Copy link
Contributor

derplayer commented Mar 11, 2019

DDS class fails to deliver propper images.

Simple Code example (read dds and write as new file):

DDS oldImage = new DDS(fileNode.FullPath);
oldImage.Write(fileNode.RootPath + "\\Dummy\\" + fileNode.RelativPath);

will deliver binary incompatible output, that is unreadable by dds tools.

Same problem with custom BaseImage object creation (read png into baseclass, convert and write to dds format):

object baseimage = Activator.CreateInstance(typeof(PNG), new object[] {  AppDomain.CurrentDomain.BaseDirectory + "Dummy\\test.png" });
BaseImage entry = (BaseImage)baseimage;
DDS image= new DDS(entry);
image.FormatDetails = new DDSFormats.DDSFormatDetails(image.FormatDetails.Format);
image.AlphaSettings = image.AlphaSettings;
image.MipHandling = image.MipHandling;
image.HasTransparency = image.HasTransparency;
image.Write(fileNode.RootPath + "\\Dummy\\" + fileNode.RelativPath);

Microsoft DDS analyse tool (texdiag.exe) fails also to analyse the created dds files:

texdiag.exe analyze test.DDS
Microsoft (R) DirectX Texture Diagnostic Tool
Copyright (C) Microsoft Corp. All rights reserved.

test.DDS FAILED (80070032)

Input file is in this case a 32bit-A8R8G8B8" DDS file (32kb + header)
returned file is much smaller (6kb + header, compression?)
Same also happens with the Texture Converter.

@derplayer
Copy link
Contributor Author

derplayer commented Mar 11, 2019

Also: some DDS files are glitched when loaded by sdk: https://vgy.me/pZfOY4.png

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

No branches or pull requests

1 participant