Add dithering script

This commit is contained in:
Jordan Cook 2023-07-09 23:54:19 -05:00
parent 904eba52e8
commit d4427d15bd
2 changed files with 20 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 110 KiB

20
dither.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Default settings for dithering
OUT_FILE="assets/images/${1%.*}.png"
PALETTE='#1d2021 #3c3836 #665c54
#928374 #f9f5d7 #fbf1c7 #f2e5bc #d5c4a1 #a89984
#fb4934 #b8bb26 #fabd2f #83a598 #d3869b #8ec07c #fe8019 #cc241d
#98971a #d79921 #458588 #b16286 #689d6a #d65d0e #9d0006 #79740e
#b57614 #076678 #8f3f71 #427b58 #af3a03'
didder -i $1 -o $OUT_FILE \
--width 500 \
--palette "$PALETTE" \
edm --serpentine FloydSteinberg
FILESIZE=$(stat -c %s $OUT_FILE)
FILESIZE=$(expr $FILESIZE / 1024)
echo "Written to $OUT_FILE (${FILESIZE}K)"
which kitten > /dev/null && kitten icat $OUT_FILE