ImageMagick

压缩 JPG 的推荐参数 1

$ convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% FILENAME

顺时针旋转:

$ convert -rotate 180 FILENAME
1

https://stackoverflow.com/a/7262050/4799273