From 7b497406136dabcce280bae3886a88ee77ebc1e7 Mon Sep 17 00:00:00 2001 From: Bert Date: Wed, 16 Feb 2011 16:47:12 +0100 Subject: First things for thumbnail mode --- main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.c') 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(); -- cgit v1.2.3-54-g00ecf