Created
April 5, 2015 16:55
-
-
Save praveenvvstgy/2d3a6e39c9884e4de992 to your computer and use it in GitHub Desktop.
Create a thumbnail using ImageMagick
This file contains hidden or 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
for file in `find . -type f -name "*.jpg"` | |
do | |
thumbnail_file="./thumbnail/${file##*/}" | |
if [ ! -e "${file%/*}/thumbnail" ]; then mkdir -p "${file%/*}/${thumbnail_dir}"; fi | |
echo "Create thumbnail for image $file" | |
`convert -thumbnail x300 $file $thumbnail_file` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment