mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
definitely NOT porn thumbnail script
This commit is contained in:
20
images/make_250x250_thumbnails/go.sh
Normal file
20
images/make_250x250_thumbnails/go.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
input_dir="$HOME/Desktop/Definitely_NOT_Porn"
|
||||||
|
exts="jpg,jpeg,JPG,png,gif"
|
||||||
|
output_dir="$HOME/Desktop/notporn_thumbnails"
|
||||||
|
|
||||||
|
if [ ! -d "$output_dir" ]; then
|
||||||
|
mkdir -p "$output_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for notpornimages in $input_dir/*.{$exts} ; do
|
||||||
|
|
||||||
|
convert "$notpornimages" \
|
||||||
|
-thumbnail 250x250^ \
|
||||||
|
-gravity center \
|
||||||
|
-extent 250x250 \
|
||||||
|
-set filename:fname '%t_thumb' \
|
||||||
|
"$output_dir"/'%[filename:fname].jpg'
|
||||||
|
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user