fixed uploading non square images

This commit is contained in:
Concedo
2024-03-13 14:19:51 +08:00
parent 85287c7701
commit a9435163ab
+10
View File
@@ -11327,11 +11327,21 @@ Current version: 124
{
//portrait
minsizeH *= 1.5;
canvas.width = wantedWidth = maxSize/1.5;
canvas.height = wantedHeight = maxSize;
}
else if(aspectratio>1.4)
{
//landscape
minsizeW *= 1.5;
canvas.width = wantedWidth = maxSize;
canvas.height = wantedHeight = maxSize/1.5;
}
else
{
//square
canvas.width = wantedWidth = maxSize;
canvas.height = wantedHeight = maxSize;
}
let mx = (origW - minsizeW) / 2;