mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Fix friends++, saving prints, deleted userdata
This commit is contained in:
@@ -199,17 +199,20 @@ namespace VRCX
|
||||
|
||||
await print.SaveAsPngAsync(tempPath);
|
||||
|
||||
using var oldPngFile = new PNGFile(path);
|
||||
using var newPngFile = new PNGFile(tempPath);
|
||||
|
||||
var oldPngFile = new PNGFile(path);
|
||||
var newPngFile = new PNGFile(tempPath);
|
||||
|
||||
// Copy all iTXt chunks to new file
|
||||
var textChunks = oldPngFile.GetChunksOfType(PNGChunkTypeFilter.iTXt);
|
||||
|
||||
|
||||
for (var i = 0; i < textChunks.Count; i++)
|
||||
{
|
||||
newPngFile.WriteChunk(textChunks[i]);
|
||||
}
|
||||
|
||||
oldPngFile.Dispose();
|
||||
newPngFile.Dispose();
|
||||
|
||||
File.Move(tempPath, path, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user