Created
April 8, 2015 06:42
-
-
Save oimou/7fd554e36d1b2a238371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function iconify { | |
filepath=$1 | |
directory_name=`dirname ${filepath}` | |
filename=`basename ${filepath}` | |
filename_without_extension=${filename%.*} | |
extname=${filename##*.} | |
newfilename=${directory_name}/${filename_without_extension}-128x128.${extname} | |
convert -resize 128x128 $1 ${newfilename} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: iconify FILENAME