mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 12:33:12 +00:00
DDS : Fix saving as stand alone format.
This commit is contained in:
parent
fe738ddb24
commit
849aa7f6c2
1 changed files with 8 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue