Created
May 20, 2015 05:33
-
-
Save ikait/075d8cdbda2bd4bc741d to your computer and use it in GitHub Desktop.
cwebp を使ってディレクトリ内の画像ファイルを webp に変換する。クオリティ (-1) は 10 から 5 刻みで 60 まで。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
for i in {10..60..5} | |
do | |
echo "---------------------------------------------" | |
echo "[start] rate: $i %" | |
echo "---------------------------------------------" | |
find . -name "*.png" -print0 | xargs -0 -I{} cwebp -q $i {} -o {}-$i.webp | |
echo "---------------------------------------------" | |
echo "[finish] rate: $i % " | |
echo "---------------------------------------------" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
予め -q を決めておくとき: