diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-08-14 01:27:12 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-08-14 01:27:12 +0300 |
commit | c8146e32ab0037c3652263372082d6d0a15b89a9 (patch) | |
tree | edf16e456ee3e5f9f3b13477fcf8049d61889bc1 | |
download | telegram-based-wojak-c8146e32ab0037c3652263372082d6d0a15b89a9.tar.gz |
feat: add Makefile to convert images
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 17 |
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 |