aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile17
2 files changed, 18 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1fcb152
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+out
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5b657da
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+SOURCES=$(wildcard src/*)
+OUTPUTS=$(patsubst src/%.png, out/%.png, $(patsubst src/%.jpg, out/%.png, $(SOURCES)))
+
+SIZE=512x512
+FUZZ=50%
+
+all: $(OUTPUTS)
+
+open: all
+ sxiv -t out
+
+out/%.png: src/%.*
+ @mkdir -p out
+ convert $< -fuzz $(FUZZ) -fill none -floodfill +0+0 white -resize $(SIZE)\> $@
+
+clean:
+ rm -rf out