Skip to content

Instantly share code, notes, and snippets.

View clarityflowers's full-sized avatar

Clarity clarityflowers

View GitHub Profile
@clarityflowers
clarityflowers / dither
Last active January 28, 2021 09:44
Make a little dithered image
#!/bin/bash
USAGE="${0##*/} <origin> <dest> <size> <num-colors> [<filter-color> <filter-amount>]"
if [[ $1 == --help ]]; then
echo $USAGE
elif [[ -n $5 ]]; then
magick $1 -dither Floyd-Steinberg -resize $3 -colors $4 \
\( +clone -fill $5 -colorize $6 \) -compose dissolve \
-define compose:args=25 -colors $4 -composite \
$2 && open -a Preview $2
else
-- Invaders!
-- A simple little "game" for an interview for the recurse center.
-- Runs uses Löve2d.
-- Download Löve at https://love2d.org/#download,
-- To run the game, rename it to "main.lua" and put it in its own folder.
-- Then navigate to that folder and run "love ."
-- All the state lives in one object.
-- I find that having this beforehand opens up possibilities