From c8146e32ab0037c3652263372082d6d0a15b89a9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 14 Aug 2021 01:27:12 +0300 Subject: feat: add Makefile to convert images --- .gitignore | 1 + Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile 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 -- cgit v1.2.3