Skip to content

Instantly share code, notes, and snippets.

@nemanjan00
Created August 27, 2018 17:08
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 nemanjan00/0fdef397ad4438e7fe4ad7e843e21efb to your computer and use it in GitHub Desktop.
Save nemanjan00/0fdef397ad4438e7fe4ad7e843e21efb to your computer and use it in GitHub Desktop.
#!/bin/bash
WIDTH=1366
HIGHT=768
for filename in ~/Pictures/WallpapersOriginal/*.jpg; do
filename=$(basename $filename)
echo $filename
convert ~/Pictures/WallpapersOriginal/$filename -resize $WIDTH -resize ${WIDTH}x$HIGHT^ -gravity center -background black -extent 1366x768 -quality 90 ~/Pictures/Wallpapers/$filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment