blob: 351594629f0b2c46c99558868cd0868a7c5c0fbd (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
commit:
@ git add -v -- $(shell git ls-files -dmo site/ links/ media/ src/inc/ | fzf -m)
@ git commit -m "% update site" -esS
edit:
@ ${EDITOR} src/inc/$(shell pushd src/inc >/dev/null && git ls-files -c . | fzf -m --bind=ctrl-c:accept-or-print-query)
change:
@ ${MAKE} edit
@ ${MAKE} gen
@ ${MAKE} commit
.PHONY: commit edit change
IN ?=
OUT ?=
SCALE ?= x400
compress:
# => https://kokorobot.ca/site/image_optimization.html
magick $(IN) \
-sampling-factor 4:2:0 \
-quality 85 \
-interlace line \
-scale $(SCALE) \
$(OUT)
exiftool -overwrite_original_in_place -all= -tagsFromFile @ -Orientation $(OUT)
# -colorspace sRGB \
dither:
# => https://legacy.imagemagick.org/Usage/quantize/#ordered-dither
magick $(IN) \
-sampling-factor 4:2:0 \
-strip \
-quality 85 \
-interlace line \
-ordered-dither o3x3 \
-scale $(SCALE) \
$(OUT)
# -colorspace Gray \
.PHONY: compress dither
|