All work on aktinson dithering-related scripts
This commit is contained in:
parent
dea1fb8134
commit
727713f41b
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
SKETCH=$(realpath "${1}")
|
||||
IMAGES=$(realpath "${2}")
|
||||
SVG=$(realpath "${3}")
|
||||
|
||||
FILES=$(mktemp)
|
||||
ls -1 "${IMAGES}" > "${FILES}"
|
||||
|
||||
cd "${SKETCH}"
|
||||
|
||||
while read image; do
|
||||
echo "Processing ${image}..."
|
||||
|
||||
name=$(basename "${image}")
|
||||
name=${name%.*}
|
||||
|
||||
cp "${IMAGES}/${image}" "${SKETCH}/pos.png"
|
||||
#convert "${SKETCH}/pos.png" -negate "${SKETCH}/negative.png"
|
||||
bash ~/src/animation/white.sh "${SKETCH}/pos.png" "${SKETCH}/image.png"
|
||||
timeout 10s processing-java --sketch="${SKETCH}" --run
|
||||
#svgsort "./dithered.svg" --dim=107x99 "./fixed.svg"
|
||||
svgo -i "./dithered.svg" -o "./fixed.svg"
|
||||
cp "./fixed.svg" "${SVG}/${name}.svg"
|
||||
rm "${SKETCH}/dithered.svg"
|
||||
echo "Created ${SVG}/${name}.svg"
|
||||
done < "${FILES}"
|
||||
#
|
4
seq.sh
4
seq.sh
|
@ -18,8 +18,8 @@ INVERT="${3}"
|
|||
START_FRAME=${4}
|
||||
END_FRAME=${5}
|
||||
|
||||
WIDTH=323
|
||||
HEIGHT=242
|
||||
WIDTH=323 #80
|
||||
HEIGHT=242 #60
|
||||
|
||||
if [[ "${INVERT}" != "" ]] && [[ "${INVERT}" == "negative" ]]; then
|
||||
INVERT="negate,"
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
###########################
|
||||
#
|
||||
# Centers an image in a white frame.
|
||||
# Used for creating SVG files with a
|
||||
# "natural" offset.
|
||||
#
|
||||
###########################
|
||||
|
||||
WIDTH=101 #404
|
||||
HEIGHT=93 #374
|
||||
|
||||
#40.5
|
||||
#66
|
||||
|
||||
#FWIDTH=323
|
||||
#FHEIGHT=242
|
||||
|
||||
#800x800 white in center of image
|
||||
#convert image.jpg -background white -gravity center -extent 800x800 output.jpg
|
||||
|
||||
convert -size ${WIDTH}x${HEIGHT} xc:#FFFFFF white.png
|
||||
composite -gravity Center "${1}" white.png "${2}"
|
||||
rm white.png
|
||||
|
||||
echo "Centered in white ${1} -> ${2}"
|
Loading…
Reference in New Issue