Files
lilou-cat/normalize_imgs.sh
Pihkaal 85eac55045 refactor: rewrite in Go
NOTE: docker not working anymore
2024-11-12 16:02:02 +01:00

15 lines
420 B
Bash
Executable File

#! /bin/bash
# This script take all images of Lilou and make sure they are 1024x1024 webp images
# It is meant to be run by me, because I manually put the images in the public folder
IMG_SZ=1024
for file in public/lilou/*.jpg; do
hash=$(md5sum "$file" | awk '{print $1}')
out="./public/lilou/${hash}.webp"
cwebp "$file" -resize $IMG_SZ $IMG_SZ -o "$out"
magick "$out" -rotate 90 "$out"
rm "$file"
done