First things for thumbnail mode

This commit is contained in:
Bert
2011-02-16 16:47:12 +01:00
parent e8ed491ba9
commit 7b49740613
8 changed files with 55 additions and 2 deletions

8
main.c
View File

@ -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();