-
-
Save kidapu/94f3fcd7d33d2ce541ee96540eff60b8 to your computer and use it in GitHub Desktop.
リサイズするとき便利だよ
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
count=0 | |
for inpath in `\find /Volumes/20190915/bb -name '*.JPG' `; do | |
outpath=${inpath/bb/dd} | |
echo "- - - - - - - -" | |
if [ $((count%4)) = 0 ] ; then | |
echo $inpath | |
echo $outpath | |
echo $count | |
mv $inpath $outpath | |
fi | |
# convert -resize 1000x $inpath $outpath | |
# mv $inpath $outpath | |
count=$((count + 1)) | |
done |
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
#!/bin/sh | |
resize2 () { | |
for inpath in `\find ./191004_illust/2_thumbnail -name '*.jpg' -or -name '*.png' `; do | |
outpath=${inpath/191004_illust/191004_illust_resize} | |
echo "- - - - - - - -" | |
echo $inpath | |
echo $outpath | |
# echo $outpath | |
convert $inpath -resize 488x $outpath | |
done | |
} | |
resize3 () { | |
for inpath in `\find ./191004_illust/3_shitagaki -name '*.jpg' -or -name '*.png' `; do | |
outpath=${inpath/191004_illust/191004_illust_resize} | |
echo "- - - - - - - -" | |
echo $inpath | |
echo $outpath | |
# echo $outpath | |
convert $inpath -resize 1918x $outpath | |
# convert $inpath -quality 100 $outpath | |
done | |
} | |
# main | |
case $1 in | |
# "resize1") resize1;; | |
"resize2") resize2;; | |
"resize3") resize3;; | |
*) echo "引数を指定して下さい";; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment