mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Automatically resize images to fit limits (#831)
Resize images for Avatars, Worlds, Gallery, Icons and Emojis when uploading if it exceeds VRChats limits (2000 pixels in any dimension and 10MB file size).
This commit is contained in:
@@ -217,7 +217,8 @@ namespace VRCX
|
||||
}
|
||||
}
|
||||
var imageData = options["imageData"] as string;
|
||||
byte[] fileToUpload = Convert.FromBase64CharArray(imageData.ToCharArray(), 0, imageData.Length);
|
||||
byte[] fileToUpload = AppApi.Instance.ResizeImageToFitLimits(Convert.FromBase64String(imageData));
|
||||
|
||||
string fileFormKey = "file";
|
||||
string fileName = "blob";
|
||||
string fileMimeType = "image/png";
|
||||
|
||||
Reference in New Issue
Block a user