Blame view

img/Makefile 1.06 KB
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
1
2
3
  VECTORS=$(shell echo *.svg)
  PLACEHOLDERS=200
  CUSTOM=mainBgPattern.png polyMap.png
05eb2eae   Geoffrey PREUD'HOMME   Better images
4
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
5
6
7
  COMPRESSED=$(shell cd orig; echo *.jpg)
  MATRIXED=$(subst svg,png,$(VECTORS))
  PLACEHOLDERS_PNG=$(addprefix ph,$(addsuffix .png,$(PLACEHOLDERS)))
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
8
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
9
  ALL=$(COMPRESSED) $(MATRIXED) $(PLACEHOLDERS_PNG) $(CUSTOM)
daf147e9   Geoffrey PREUD'HOMME   Added background ...
10
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
11
12
13
  all: $(ALL)
  
  # CUSTOM
daf147e9   Geoffrey PREUD'HOMME   Added background ...
14
15
16
  mainBgPattern.png:
  	wget http://subtlepatterns.com/patterns/low_contrast_linen.png -O $@
  	convert -negate $@ $@
32187f6d   Geoffrey PREUD'HOMME   More blue
17
  	convert -channel B -evaluate multiply 1.2 $@ $@
b307959a   Geoffrey PREUD'HOMME   Optipng bg pattern
18
  	optipng -o7 $@
05eb2eae   Geoffrey PREUD'HOMME   Better images
19
  
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
20
  polyMap.png:
3a30fef5   Geoffrey PREUD'HOMME   Better remplaceme...
21
  	wget "https://maps.googleapis.com/maps/api/staticmap?center=50.6074998,3.1373338&zoom=16&size=640x200&scale=2&maptype=roadmap&markers=color:red%7Clabel:P%7C50.6074998,3.1373338" -O $@
a2f5866b   Geoffrey PREUD'HOMME   Added static map ...
22
23
  	optipng -o7 $@
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
24
25
26
27
28
29
30
  # PLACEHOLDERS
  ph%.png:
  	wget "http://fakeimg.pl/$(subst ph,,$(subst .png,,$@))/" -O $@
  	optipng -o7 $@
  
  # MATRIXED
  # $(MATRIXED): $(subst png,svg,$@)
05eb2eae   Geoffrey PREUD'HOMME   Better images
31
  %.png: %.svg
05eb2eae   Geoffrey PREUD'HOMME   Better images
32
33
34
  	convert -background none $< $@
  	optipng -o7 $@
  
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
35
36
  # COMPRESSED
  # $(COMPRESSED): orig/$@
05eb2eae   Geoffrey PREUD'HOMME   Better images
37
  %.jpg: orig/%.jpg
9a8ade67   Geoffrey PREUD'HOMME   Larger JPEG for H...
38
  	convert -resize x1200 -strip -interlace Plane -gaussian-blur 0.05 -quality 90% $< $@
05eb2eae   Geoffrey PREUD'HOMME   Better images
39
40
  
  clean:
511c4027   Geoffrey PREUD'HOMME   Better img Makefile
41
  	rm -rf $(ALL)