From a9435163ab31895fd87f32b44da54455f53dd737 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 13 Mar 2024 14:19:51 +0800 Subject: [PATCH] fixed uploading non square images --- klite.embd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/klite.embd b/klite.embd index f07f571fc986c..9aa438f73da31 100644 --- a/klite.embd +++ b/klite.embd @@ -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;