Created
December 10, 2013 19:20
-
-
Save valentinvieriu/7896480 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
#!/bin/bash | |
width=60; | |
height=60; | |
x_offset=10; | |
y_offset=5; | |
filelist=`ls | grep '.jpg'` | |
for image_file in $filelist | |
do | |
preextensionfilename=`convert $image_file -format "%t" info:` | |
convert $image_file -crop ${width}x${height}+${x_offset}+${y_offset} \ | |
${preextensionfilename}_${width}x${height}.jpg | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment