Fix friends++, saving prints, deleted userdata

This commit is contained in:
Natsumi
2025-08-05 12:54:27 +12:00
parent 7a4a66e111
commit bc39768ff6
3 changed files with 54 additions and 18 deletions

View File

@@ -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;
}