diff options
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/index.c b/src/index.c index c8c34c5..b0b6923 100644 --- a/src/index.c +++ b/src/index.c @@ -1,7 +1,7 @@ /* index.c Copyright (C) 1999-2003 Tom Gilbert. -Copyright (C) 2010-2011 Daniel Friesel. +Copyright (C) 2010-2020 Birte Kristina Friesel. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to @@ -131,7 +131,7 @@ void init_index_mode(void) weprintf( "The image size you specified (%dx%d) is not large\n" "enough to hold all %d thumbnails. To fit all the thumbnails,\n" - "either decrease their size, choos e asmaller font,\n" + "either decrease their size, choose a smaller font,\n" "or use a larger image (like %dx%d)", opt.limit_w, opt.limit_h, filelist_len, w, h); h = opt.limit_h; @@ -147,9 +147,16 @@ void init_index_mode(void) index_image_height = h + title_area_h; im_main = imlib_create_image(index_image_width, index_image_height); - if (!im_main) - eprintf("Failed to create %dx%d pixels (%d MB) index image. Do you have enough RAM?", - index_image_width, index_image_height, index_image_width * index_image_height * 4 / (1024*1024)); + if (!im_main) { + if (index_image_height >= 32768 || index_image_width >= 32768) { + eprintf("Failed to create %dx%d pixels (%d MB) index image.\n" + "This is probably due to Imlib2 issues when dealing with images larger than 32k x 32k pixels.", + index_image_width, index_image_height, index_image_width * index_image_height * 4 / (1024*1024)); + } else { + eprintf("Failed to create %dx%d pixels (%d MB) index image. Do you have enough RAM?", + index_image_width, index_image_height, index_image_width * index_image_height * 4 / (1024*1024)); + } + } if (bg_im) gib_imlib_blend_image_onto_image(im_main, bg_im, @@ -325,7 +332,7 @@ void init_index_mode(void) gib_imlib_save_image_with_error_return(im_main, output_buf, &err); if (err) { - feh_imlib_print_load_error(output_buf, im_main, err); + feh_print_load_error(output_buf, im_main, err, LOAD_ERROR_IMLIB); } else if (opt.verbose) { int tw, th; |