-
Notifications
You must be signed in to change notification settings - Fork 3
/
DAIN_retrieve_autopixel4.sh
32 lines (30 loc) · 1.53 KB
/
DAIN_retrieve_autopixel4.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
THISFILE=`basename "$0"`
PYSCRIPTPATH="${0%\\*}\\" #If the .sh script is somewhere else, put the absolute path instead
PARAM_FOLDER=$(dirname -- "$1")
#PARAM_FOLDER="${1%\\*}" #The python script will be local to the image (for creating new ones)
cd "$PARAM_FOLDER"
python -V
(
for FILE in "$@"
do
FULLNAME=$(basename -- "$FILE")
NAME="${FULLNAME%.*}"
EXTENSION="${FULLNAME##*.}"
PARENTFOLDER=$(dirname -- "$FILE")
echo python "$PYSCRIPTPATH"transfer_palette.py "$FILE" "$PARENTFOLDER""/""$NAME""/interpolated_frames"
python "$PYSCRIPTPATH"transfer_palette.py "$FILE" "$PARENTFOLDER""/""$NAME""/interpolated_frames"
mv "$NAME"_EXT_interpolated_frames.gif "$NAME"_interp.gif
#bash "$PYSCRIPTPATH"_unoptimize_gif.sh "$NAME"_interp.gif
#bash "$PYSCRIPTPATH""bg empty.sh" "$NAME"_interp.gif
#mv "$NAME""_interp#_empty.gif" "$NAME"_interp.gif
###bash "$PYSCRIPTPATH"_unoptimize_gif.sh "$NAME"_interp.gif
bash "$PYSCRIPTPATH""redux nearest 4.sh" "$NAME"_interp.gif
###bash "$PYSCRIPTPATH"_unoptimize_gif.sh "$NAME"_interp_N4.gif
bash "$PYSCRIPTPATH""resample X4.sh" "$NAME"_interp_N4.gif
bash "$PYSCRIPTPATH"_unoptimize_gif.sh "$NAME"_interp_N4_X4.gif
mv "$NAME"_interp.gif "$NAME""(interp).gif"
#mv "$NAME"_interp_N4.gif "$NAME""_interp(small).gif"
#mv "$NAME"_interp_N4_X4.gif "$NAME""_interp(big).gif"
done
)
exec $SHELL