Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
SatooRu65536 committed Feb 2, 2025
1 parent 0d59795 commit 3dc1d55
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions script/resize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# $1 がない場合は終了
if [ -z $1 ]; then
echo "Usage: $0 <directory>"
exit 1
fi
cd $1
find . -type f -name "*.webp" | while read INPUT; do
if [ $(identify -format "%w" "$INPUT") -le 810 ]; then
continue
fi
cwebp -resize 1920 0 "$INPUT" -o "$INPUT"
done

0 comments on commit 3dc1d55

Please sign in to comment.