1
0
mirror of synced 2024-11-30 18:24:39 +01:00

DDS : Fix saving as stand alone format.

This commit is contained in:
KillzXGaming 2021-12-31 14:27:58 -05:00
parent fe738ddb24
commit 849aa7f6c2

View File

@ -128,8 +128,8 @@ namespace Toolbox.Library
} }
public void Save(System.IO.Stream stream) public void Save(System.IO.Stream stream) {
{ Save(this, stream, GetSurfaces());
} }
@ -1348,7 +1348,12 @@ namespace Toolbox.Library
public void Save(DDS dds, string FileName, List<Surface> data = null) public void Save(DDS dds, string FileName, List<Surface> data = null)
{ {
FileWriter writer = new FileWriter(new FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write)); Save(dds, new FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write), data);
}
public void Save(DDS dds, Stream stream, List<Surface> data = null)
{
FileWriter writer = new FileWriter(stream);
var header = dds.header; var header = dds.header;
writer.Write(Encoding.ASCII.GetBytes("DDS ")); writer.Write(Encoding.ASCII.GetBytes("DDS "));
writer.Write(header.size); writer.Write(header.size);