Rotate JPEG images using jpegtran

14 Apr 2009

A quick note on how to rotate jpeg images, not because it’s earth-shatteringly smart but so I don’t keep having to think every time I want to do it:

  • sudo aptitude install libjpeg-progs (contains jpegran on Ubuntu)
  • for i in *jpg; do jpegtran -rotate 180 $i > rotated/$i ; done

This can probably be done with other tools (eg imagemagick), but jpegtran has a small manpage :-)

comments powered by Disqus

  « Previous: Next: »