mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Fix print cropping and Linux custom photo path
This commit is contained in:
@@ -191,7 +191,8 @@ namespace VRCX
|
||||
var ms = new MemoryStream(bytes);
|
||||
var print = await Image.LoadAsync(ms);
|
||||
// validation step to ensure image is actually a print
|
||||
if (print.Width != 2048 || print.Height != 1440) return false;
|
||||
if (print.Width != 2048 || print.Height != 1440)
|
||||
return false;
|
||||
|
||||
var point = new Point(64, 69);
|
||||
var size = new Size(1920, 1080);
|
||||
@@ -199,14 +200,7 @@ namespace VRCX
|
||||
print.Mutate(x => x.Crop(rectangle));
|
||||
await print.SaveAsPngAsync(tempPath);
|
||||
if (ScreenshotHelper.HasTXt(path))
|
||||
{
|
||||
var success = ScreenshotHelper.CopyTXt(path, tempPath);
|
||||
if (!success)
|
||||
{
|
||||
File.Delete(tempPath);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
ScreenshotHelper.CopyTXt(path, tempPath);
|
||||
File.Move(tempPath, path, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user