Skip to content

Instantly share code, notes, and snippets.

@kkotaro0111
Created August 27, 2015 09:33
Show Gist options
  • Save kkotaro0111/8fd7826b6c41b41be58f to your computer and use it in GitHub Desktop.
Save kkotaro0111/8fd7826b6c41b41be58f to your computer and use it in GitHub Desktop.
jpegoptim を使ったJPGの画像サイズ最適化
#!/bin/bash
# image_00.jpg 〜 image_09.jpg を再圧縮して上書きする
# --max に与えられる ${1} は 0〜100の値を持つ
# usage resize.sh 100
for i in {0..9}; do
jpegoptim --strip-all --max=${1} image_0${i}.jpg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment