Skip to content

Commit

Permalink
fixed uploading non square images
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Mar 13, 2024
1 parent 85287c7 commit a943516
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions klite.embd
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a943516

Please sign in to comment.