Skip to content

Instantly share code, notes, and snippets.

@mcnaveen
Created July 11, 2023 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcnaveen/d2a9cabe7476ba01948326773d41aa27 to your computer and use it in GitHub Desktop.
Save mcnaveen/d2a9cabe7476ba01948326773d41aa27 to your computer and use it in GitHub Desktop.
Bash Script to Generate blurhash for all the images in the folder.
#!/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