Skip to content

Instantly share code, notes, and snippets.

@harrytallbelt
Created March 20, 2017 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harrytallbelt/425806bd4a202453d674c9b7ebc75246 to your computer and use it in GitHub Desktop.
Save harrytallbelt/425806bd4a202453d674c9b7ebc75246 to your computer and use it in GitHub Desktop.
Bash script to convert coloured photos to (much smaller) grayscale using imagemagick package.
#!/bin/bash
mkdir results
for image in *.jpg
do
convert -colorspace Gray -interlace Plane -gaussian-blur 0.05 -quality 50% $image ./results/$image
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment