mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
Option to copy VRC images
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
@@ -453,7 +454,11 @@ namespace VRCX
|
||||
MainForm.Instance.BeginInvoke(new MethodInvoker(() =>
|
||||
{
|
||||
var image = Image.FromFile(path);
|
||||
Clipboard.SetImage(image);
|
||||
// Clipboard.SetImage(image);
|
||||
var data = new DataObject();
|
||||
data.SetData(DataFormats.Bitmap, image);
|
||||
data.SetFileDropList(new StringCollection { path });
|
||||
Clipboard.SetDataObject(data, true);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ namespace VRCX
|
||||
/// <param name="metadataString">The metadata to add to the screenshot file.</param>
|
||||
/// <param name="worldId">The ID of the world to associate with the screenshot.</param>
|
||||
/// <param name="changeFilename">Whether or not to rename the screenshot file to include the world ID.</param>
|
||||
public void AddScreenshotMetadata(string path, string metadataString, string worldId, bool changeFilename = false)
|
||||
public string AddScreenshotMetadata(string path, string metadataString, string worldId, bool changeFilename = false)
|
||||
{
|
||||
var fileName = Path.GetFileNameWithoutExtension(path);
|
||||
if (!File.Exists(path) || !path.EndsWith(".png") || !fileName.StartsWith("VRChat_"))
|
||||
return;
|
||||
return string.Empty;
|
||||
|
||||
if (changeFilename)
|
||||
{
|
||||
@@ -34,6 +34,7 @@ namespace VRCX
|
||||
}
|
||||
|
||||
ScreenshotHelper.WritePNGDescription(path, metadataString);
|
||||
return path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user