Compare commits
No commits in common. "982565bd95fb4cc20748bb03cf42e50d1cd8f764" and "c5b4dda9507dc0b2fa19b090d94f5d5653ad7490" have entirely different histories.
982565bd95
...
c5b4dda950
@ -65,8 +65,7 @@ function create_thumbnail(string $category, string $file): string | null {
|
||||
|
||||
$path = add_seperator_ab("/", $category, $file);
|
||||
$original_file = ROOT_DIR.IMG_DIR.$path;
|
||||
# use fast hashing algo, see: https://github.com/Cyan4973/xxHash
|
||||
$hash = hash_file("xxh3", $original_file);
|
||||
$hash = hash_file("sha1", $original_file);
|
||||
|
||||
$thumbnail_directory = ROOT_DIR.THUMBNAIL_DIR;
|
||||
$thumbnail_name = "$hash.jpg";
|
||||
|
@ -23,7 +23,7 @@ def main():
|
||||
exit(1)
|
||||
|
||||
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)
|
||||
|
||||
image = image.resize((target_width, new_height), Image.Resampling.BICUBIC)
|
||||
|
Loading…
Reference in New Issue
Block a user