Created
July 11, 2023 10:41
-
-
Save mcnaveen/d2a9cabe7476ba01948326773d41aa27 to your computer and use it in GitHub Desktop.
Bash Script to Generate blurhash for all the images in the folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prerequisite: Node, NPX | |
folder_path="Wallpapers" | |
for file_path in "$folder_path"/*.{jpg,png,jpeg}; do | |
if [[ -f "$file_path" ]]; then | |
echo "Generating Blurhash for $file_path" | |
npx blurhash-cli "$file_path" --local | |
echo "============================================" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment