PhotoMosaic: improve heuristic for landscape/portrait row

This commit is contained in:
Aaron van Geffen 2023-04-01 14:40:19 +02:00
parent 31ea4196cf
commit 68ef80fb9f

View File

@ -165,7 +165,10 @@ class PhotoMosaic
return [$photos, 'single'];
}
// A boring set it is, then.
return [$photos, 'row'];
// Last resort: majority vote
if ($num_portrait > $num_landscape)
return [$photos, 'portraits'];
else
return [$photos, 'row'];
}
}