Skip to content

Instantly share code, notes, and snippets.

@mritzco
Created August 10, 2021 10:05
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 mritzco/1e5993c768d96f82a9b4f34caaef1b11 to your computer and use it in GitHub Desktop.
Save mritzco/1e5993c768d96f82a9b4f34caaef1b11 to your computer and use it in GitHub Desktop.
Lineman image resizing
#!/bin/bash
filetype=png
for i in *.$filetype; do
name=$(echo $i | sed 's/\.[^.]*$//')
echo "Processing: $i"
mkdir -p $name
convert $i -resize 700x700\> $name/700;
convert $i -resize 460x460\> $name/460;
convert $i -resize 300x300\> $name/300;
convert $i -resize 240x240\> $name/240;
mv $i $name/1040
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment