aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9e5965b..c680bef 100644
--- a/main.c
+++ b/main.c
@@ -46,6 +46,8 @@ const char **filenames;
int filecnt, fileidx;
size_t filesize;
+thumb_t *thumbs;
+
#define TITLE_LEN 256
char win_title[TITLE_LEN];
@@ -119,6 +121,12 @@ int main(int argc, char **argv) {
win_open(&win);
img_init(&img, &win);
+ if (options->thumbnails) {
+ thumbs = (thumb_t*) s_malloc(filecnt * sizeof(thumb_t));
+ for (i = 0; i < filecnt; ++i)
+ img_load_thumb(&thumbs[i], filenames[i]);
+ }
+
load_image();
img_render(&img, &win);
update_title();