Compare commits

..

No commits in common. "982565bd95fb4cc20748bb03cf42e50d1cd8f764" and "c5b4dda9507dc0b2fa19b090d94f5d5653ad7490" have entirely different histories.

2 changed files with 2 additions and 3 deletions

View File

@ -65,8 +65,7 @@ function create_thumbnail(string $category, string $file): string | null {
$path = add_seperator_ab("/", $category, $file); $path = add_seperator_ab("/", $category, $file);
$original_file = ROOT_DIR.IMG_DIR.$path; $original_file = ROOT_DIR.IMG_DIR.$path;
# use fast hashing algo, see: https://github.com/Cyan4973/xxHash $hash = hash_file("sha1", $original_file);
$hash = hash_file("xxh3", $original_file);
$thumbnail_directory = ROOT_DIR.THUMBNAIL_DIR; $thumbnail_directory = ROOT_DIR.THUMBNAIL_DIR;
$thumbnail_name = "$hash.jpg"; $thumbnail_name = "$hash.jpg";

View File

@ -23,7 +23,7 @@ def main():
exit(1) exit(1)
width, height = image.size width, height = image.size
target_width = int(max(width/2, 1280)) target_width = int(max(width/4, 1280))
new_height = int(target_width * height / width) new_height = int(target_width * height / width)
image = image.resize((target_width, new_height), Image.Resampling.BICUBIC) image = image.resize((target_width, new_height), Image.Resampling.BICUBIC)