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)))
|
c7d2e510
Geoffrey PREUD'HOMME
Linked desc image...
|
8
9
|
DESC=Descriptif Concept Activites
DESC_JPG=$(addprefix desc,$(addsuffix .jpg,$(DESC)))
|
a2f5866b
Geoffrey PREUD'HOMME
Added static map ...
|
10
|
|
c7d2e510
Geoffrey PREUD'HOMME
Linked desc image...
|
11
|
ALL=$(COMPRESSED) $(MATRIXED) $(PLACEHOLDERS_PNG) $(DESC_JPG) $(CUSTOM)
|
daf147e9
Geoffrey PREUD'HOMME
Added background ...
|
12
|
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
13
14
15
|
all: $(ALL)
# CUSTOM
|
daf147e9
Geoffrey PREUD'HOMME
Added background ...
|
16
17
18
|
mainBgPattern.png:
wget http://subtlepatterns.com/patterns/low_contrast_linen.png -O $@
convert -negate $@ $@
|
32187f6d
Geoffrey PREUD'HOMME
More blue
|
19
|
convert -channel B -evaluate multiply 1.2 $@ $@
|
b307959a
Geoffrey PREUD'HOMME
Optipng bg pattern
|
20
|
optipng -o7 $@
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
21
|
|
a2f5866b
Geoffrey PREUD'HOMME
Added static map ...
|
22
|
polyMap.png:
|
3a30fef5
Geoffrey PREUD'HOMME
Better remplaceme...
|
23
|
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 ...
|
24
25
|
optipng -o7 $@
|
eb49c995
Geoffrey PREUD'HOMME
Created thumbnail...
|
26
27
28
29
30
31
32
33
34
35
|
# 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
|
36
37
38
39
40
41
42
|
# 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
|
43
|
%.png: %.svg
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
44
45
46
|
convert -background none $< $@
optipng -o7 $@
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
47
48
|
# COMPRESSED
# $(COMPRESSED): orig/$@
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
49
|
%.jpg: orig/%.jpg
|
9a8ade67
Geoffrey PREUD'HOMME
Larger JPEG for H...
|
50
|
convert -resize x1200 -strip -interlace Plane -gaussian-blur 0.05 -quality 90% $< $@
|
05eb2eae
Geoffrey PREUD'HOMME
Better images
|
51
52
|
clean:
|
511c4027
Geoffrey PREUD'HOMME
Better img Makefile
|
53
|
rm -rf $(ALL)
|