mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-18 08:44:57 +02:00
fixed uploading non square images
This commit is contained in:
+10
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user