aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2021-08-14 01:27:12 +0300
committereug-vs <eugene@eug-vs.xyz>2021-08-14 01:27:12 +0300
commitc8146e32ab0037c3652263372082d6d0a15b89a9 (patch)
treeedf16e456ee3e5f9f3b13477fcf8049d61889bc1
downloadtelegram-based-wojak-c8146e32ab0037c3652263372082d6d0a15b89a9.tar.gz
feat: add Makefile to convert images
-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