Description:
Add scripts and support files.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -0,0 +1,6 | |||||
|
|
1 | exclude FNA/lib/FAudio/.git | ||
|
|
2 | exclude FNA/lib/MojoShader/.git | ||
|
|
3 | exclude FNA/lib/SDL2-CS/.git | ||
|
|
4 | exclude FNA/lib/Theorafile/.git | ||
|
|
5 | exclude SpriteFontPlus/deps/BMFontToSpriteFont/.git | ||
|
|
6 | exclude SpriteFontPlus/deps/StbTrueTypeSharp/.git |
@@ -0,0 +1,20 | |||||
|
|
1 | #!/bin/sh | ||
|
|
2 | |||
|
|
3 | #C/O facedetect documentation (with some help from shellcheck) | ||
|
|
4 | |||
|
|
5 | IMAGES="isometric-park-fna/Content/images/" | ||
|
|
6 | |||
|
|
7 | mkdir "$IMAGES/crops" | ||
|
|
8 | |||
|
|
9 | for file in $IMAGES/*.jpg; do | ||
|
|
10 | name=$(basename "$file") | ||
|
|
11 | i=0 | ||
|
|
12 | facedetect "$file" | while read -r x y w h; do | ||
|
|
13 | x=$(( x - w)) | ||
|
|
14 | y=$(( y - h)) | ||
|
|
15 | w=$(( w * 3)) | ||
|
|
16 | h=$(( w * 4 / 3 )) | ||
|
|
17 | convert "$file" -crop "${w}x${h}+${x}+${y}" "$IMAGES/crops/${name%.*}_${i}.${name##*.}" | ||
|
|
18 | i=$((i + 1)) | ||
|
|
19 | done | ||
|
|
20 | done |
You need to be logged in to leave comments.
Login now