Script to generate Retina conpatible iamge.
#!/bin/bash | |
# How to use | |
# $makeRetinaImages.sh folder_name | |
# The folder name should end by '/'. | |
# | |
for file in `ls $1`; do | |
if expr "$file" : ".*\.png" >/dev/null; then | |
file2x=`echo $file|sed 's/\(.*\)\(\.png\)/\1\@2x\2/'` | |
mv $1$file $1$file2x | |
convert -geometry 50% $1$file2x $1$file | |
else | |
echo "only support .png file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment