Skip to content

Instantly share code, notes, and snippets.

@drjova
Forked from benvium/resizer.txt
Last active May 13, 2021 16:12
Show Gist options
  • Save drjova/4f23d64d887b25d97bcd2fd2c0e76936 to your computer and use it in GitHub Desktop.
Save drjova/4f23d64d887b25d97bcd2fd2c0e76936 to your computer and use it in GitHub Desktop.
Reskize images
#!/bin/bash -e
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
then
echo "$f -> ${f//@3x/@2x}, ${f//@3x/}"
convert "$f" -resize 66.66666% "${f//@3x/@2x}"
convert "$f" -resize 33.33333% "${f//@3x/}"
fi
done
echo "Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment