Skip to content

Instantly share code, notes, and snippets.

@praveenvvstgy
Created April 5, 2015 16:55
Show Gist options
  • Save praveenvvstgy/2d3a6e39c9884e4de992 to your computer and use it in GitHub Desktop.
Save praveenvvstgy/2d3a6e39c9884e4de992 to your computer and use it in GitHub Desktop.
Create a thumbnail using ImageMagick
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