Добавил проверку изображения в апи постов и ещё по мелочи

This commit is contained in:
2023-09-07 23:05:23 +03:00
parent 9a4658f3ea
commit e487ed79c4
8 changed files with 49 additions and 10 deletions

View File

@@ -18,4 +18,11 @@ function GenerateRandomString (int $length, string $keyspace = "abcdefghijklmnop
return implode('', $pieces);
}
// Get aspect ratio from width and height
function GetAspectRatio ($x, $y) {
if ($x === $y)
return 1;
return max($x, $y) / min($x, $y);
}
?>