Created
September 7, 2024 18:00
-
-
Save onnyyonn/6a7ac72f1b55ff615e91886adbe48ac5 to your computer and use it in GitHub Desktop.
Batch half-pixel blur
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 | |
| export_dir="Export" | |
| share_dir="Share" | |
| mkdir -p "$share_dir" | |
| overwrite=false | |
| if [[ "$1" == "-overwrite" ]]; then | |
| overwrite=true | |
| fi | |
| for image in "$export_dir"/*.png; do | |
| base_name=$(basename "$image") | |
| blurred_image="$share_dir/${base_name}" | |
| if $overwrite || [[ ! -f "$blurred_image" ]]; then | |
| magick "$image" -blur 0x0.5 "$blurred_image" | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment