diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-29 21:09:33 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-11-29 21:09:33 +0300 |
commit | 62d52b597d6a9cf4ed7ef0782fad8ca5eca24aa0 (patch) | |
tree | e6cf0ac8a92f7a26b5bc36ee821add9741042fd8 /src/site.c | |
parent | 8e07de9d952f8f27273296f1b6ae58550ce1e98b (diff) | |
download | revela-62d52b597d6a9cf4ed7ef0782fad8ca5eca24aa0.tar.gz revela-62d52b597d6a9cf4ed7ef0782fad8ca5eca24aa0.zip |
config: blur setting for thumbnails/images
Diffstat (limited to 'src/site.c')
-rw-r--r-- | src/site.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -111,7 +111,8 @@ optimize_image(MagickWand *wand, const char *dst, nx = ny * ratio; } } - TRYWAND(wand, MagickResizeImage(wand, nx, ny, GaussianFilter, 0)); + TRYWAND(wand, MagickResizeImage(wand, nx, ny, GaussianFilter, + conf->blur)); } TRYWAND(wand, MagickWriteImage(wand, dst)); setdatetime(dst, srcmtim); @@ -214,8 +215,8 @@ albums_walk(struct bstnode *node, void *data) struct stat dstat; if (!nmkdir(album->slug, &dstat, site->dry_run)) return false; + hashmap_insert(site->album_dirs, album->slug, (char *)album->slug); if (!site->dry_run) { - hashmap_insert(site->album_dirs, album->slug, (char *)album->slug); if (!render_set_album_vars(&site->render, album)) return false; } @@ -390,9 +391,7 @@ site_init(struct site *site) site->rel_content_dir = strlen(site->root_dir) + 1; InitializeMagick(NULL); site->wand = NewMagickWand(); - if (!site->dry_run) { - site->album_dirs = hashmap_new(); - } + site->album_dirs = hashmap_new(); site->render.dry_run = site->dry_run; return true; |