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 $@
|
eb49c995
Geoffrey PREUD'HOMME
Created thumbnail...
|
24
25
26
27
28
29
30
31
32
33
|
# DESCRIPTION
descDescriptif.jpg: orig/descDescriptif.jpg
convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity center -composite -resize x400 -quality 90% $@
descConcept.jpg: orig/descConcept.png
convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity center -composite -resize x400 -quality 90% $@
descActivites.jpg: orig/descActivites.jpg
convert $< -set option:size '%[fx:min(w,h)]x%[fx:min(w,h)]' xc:none +swap -gravity east -composite -resize x400 -quality 90% $@
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
34
35
36
37
38
39
40
|
# 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
|
41
|
%.png: %.svg
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
42
43
44
|
convert -background none $< $@
optipng -o7 $@
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
45
46
|
# COMPRESSED
# $(COMPRESSED): orig/$@
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
47
|
%.jpg: orig/%.jpg
|
9a8ade67
Geoffrey PREUD'HOMME
Larger JPEG for H...
|
48
|
convert -resize x1200 -strip -interlace Plane -gaussian-blur 0.05 -quality 90% $< $@
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
49
50
|
clean:
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
51
|
rm -rf $(ALL)
|