Chain image optimizations

This commit is contained in:
Fabien Freling 2019-10-29 13:32:03 +01:00
parent f1d5637473
commit f53cb6ef34
5 changed files with 9 additions and 2 deletions

View file

@ -12,3 +12,7 @@ HTML_TEMPLATE = main.html
--include-after-body=&(root)/templates/footer.html \ --include-after-body=&(root)/templates/footer.html \
%f | sed 's|%%webRoot%%|&(root)|g' > %o \ %f | sed 's|%%webRoot%%|&(root)|g' > %o \
|> %B.html |> %B.html
!compress_png = |> zopflipng %f %o |>
!compress_jpg = |> cjpeg -quality 80 -progressive -outfile %o %f |>
!thumbnail = |> convert %f -resize 400x400 -blur 0x8 %o |>

View file

@ -8,5 +8,5 @@ title: Projects
<li><a href="projects/trailr/index.html" style="background-image: url(projects/trailr/thumb.jpg);">Trailr</a></li> <li><a href="projects/trailr/index.html" style="background-image: url(projects/trailr/thumb.jpg);">Trailr</a></li>
<li><a href="projects/whereiscar/index.html" style="background-image: url(projects/whereiscar/thumb.png);">Where is my car?</a></li> <li><a href="projects/whereiscar/index.html" style="background-image: url(projects/whereiscar/thumb.png);">Where is my car?</a></li>
<li><a href="projects/maestro/index.html" style="background-image: url(projects/maestro/thumb.png);">Maestro</a></li> <li><a href="projects/maestro/index.html" style="background-image: url(projects/maestro/thumb.png);">Maestro</a></li>
<li><a href="projects/dawnchaos/index.html" style="background-image: url(projects/dawnchaos/thumb.png);">Dawn of Chaos</a></li> <li><a href="projects/dawnchaos/index.html" style="background-image: url(projects/dawnchaos/thumb.jpg);">Dawn of Chaos</a></li>
</ul> </ul>

View file

@ -1,4 +1,6 @@
include_rules include_rules
: index.md |> !html |> : index.md |> !html |>
: thumbnail.png |> convert %f -blur 0x8 %o |> thumb.png : shot_01.png |> !thumbnail |> thumb_temp.jpg
: thumb_temp.jpg |> !compress_jpg |> thumb.jpg
: foreach *.png |> !compress_png |> %g_opt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

View file

@ -1,3 +1,4 @@
templates* templates*
tup.config tup.config
README.html README.html
*_temp.*