TheRepoClub-DotFiles/localbin/.local/bin/bulkresize

28 lines
727 B
Plaintext
Raw Normal View History

2021-01-09 12:38:56 -05:00
#!/usr/bin/env bash
#------------------------------------------------------------------------------
# Path - /usr/bin/bulkresize
# GitHub - https://github.com/The-Repo-Club/
# Author - The-Repo-Club [wayne6324@gmail.com]
# Start On - Sun 31 Oct 00:30:03 BST 2021
# Modified On - Sun 31 Oct 00:30:03 BST 2021
#------------------------------------------------------------------------------
size=1920x1080
# Catch user input for file type.
echo "Enter the file extension for your image files:"
# Store user input in $files.
read ext
# Resize images.
for img in *.$ext; do
mkdir -p "resize"
convert -resize $size! "$img" "resize/$img"
printf "converting %s to %s\n" "$img" "$size"
done