blob: 4c47f9704f5d35557cb07d5ff59125db08a56112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
SOURCES=$(wildcard src/*)
OUTPUTS=$(patsubst src/%.png, out/%.png, $(patsubst src/%.jpg, out/%.png, $(SOURCES)))
SIZE=512x512
FUZZ=50%
VIEW_COMMAND=sxiv -t
all: $(OUTPUTS)
view: all
$(VIEW_COMMAND) out
viewsrc:
$(VIEW_COMMAND) src
out/%.png: src/%.*
@mkdir -p out
magick $< \
-fuzz $(FUZZ) -fill none \
-floodfill +0+0 white \
-floodfill "+%[fx:w-1]+0" white \
-trim +repage \
-resize $(SIZE) $@
clean:
rm -rf out
|