Fix error reading metadata

This commit is contained in:
Natsumi
2025-08-15 15:57:28 +12:00
parent 8e19175b15
commit 8daa6c8663
4 changed files with 9 additions and 8 deletions

View File

@@ -199,8 +199,8 @@ namespace VRCX
await print.SaveAsPngAsync(tempPath);
var oldPngFile = new PNGFile(path);
var newPngFile = new PNGFile(tempPath);
var oldPngFile = new PNGFile(path, false);
var newPngFile = new PNGFile(tempPath, true);
// Copy all iTXt chunks to new file
var textChunks = oldPngFile.GetChunksOfType(PNGChunkTypeFilter.iTXt);

View File

@@ -35,7 +35,7 @@ public partial class AppApi
}
}
using var png = new PNGFile(path);
using var png = new PNGFile(path, false);
metadata.Add("fileResolution", PNGHelper.ReadResolution(png));
var creationDate = File.GetCreationTime(path);