Loading man/feh.pre +10 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,16 @@ Zoom pictures to screen size in fullscreen / fixed geometry mode. . Create borderless windows. . .It Cm --cache-size Ar size . Set Imlib2 in-memory cache to .Ar size MiB. A higher cache size can significantly improve performance especially for small slide shows, however at the cost of increased memory consumption. .Ar size must be between 0 and 2048 MiB and defaults to 4. . .It Cm -P , --cache-thumbnails . Enable thumbnail caching in Loading src/help.raw +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ OPTIONS --min-dimension WxH Only show images with width >= W and height >= H --max-dimension WxH Only show images with width <= W and height <= H --scroll-step COUNT scroll COUNT pixels when movement key is pressed --cache-size NUM imlib cache size in mebibytes (0 .. 2048) MONTAGE MODE OPTIONS -X, --ignore-aspect Set thumbnail to specified width/height without Loading src/imlib.c +12 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,8 @@ void init_x_and_imlib(void) imlib_context_set_operation(IMLIB_OP_COPY); wmDeleteWindow = XInternAtom(disp, "WM_DELETE_WINDOW", False); imlib_set_cache_size(opt.cache_size * 1024 * 1024); /* Initialise random numbers */ srand(getpid() * time(NULL) % ((unsigned int) -1)); Loading Loading @@ -254,6 +256,16 @@ int feh_load_image(Imlib_Image * im, feh_file * file) return(0); } /* * By default, Imlib2 unconditionally loads a cached file without checking * if it was modified on disk. However, feh (or rather its users) should * expect image changes to appear at the next reload. So we tell Imlib2 to * always check the file modification time and only use a cached image if * the mtime was not changed. The performance penalty is usually negligible. */ imlib_context_set_image(*im); imlib_image_set_changes_on_disk(); #ifdef HAVE_LIBEXIF int orientation = 0; ExifData *exifData = exif_data_new_from_file(file->filename); Loading src/options.c +10 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ void init_parse_options(int argc, char **argv) opt.jump_on_resort = 1; opt.screen_clip = 1; opt.cache_size = 4; #ifdef HAVE_LIBXINERAMA /* if we're using xinerama, then enable it by default */ opt.xinerama = 1; Loading Loading @@ -410,6 +411,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"xinerama-index", 1, 0, 239}, {"insecure" , 0, 0, 240}, {"no-recursive" , 0, 0, 241}, {"cache-size" , 1, 0, 243}, {0, 0, 0, 0} }; int optch = 0, cmdx = 0; Loading Loading @@ -772,6 +774,14 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) break; case 241: opt.recursive = 0; break; case 243: opt.cache_size = atoi(optarg); if (opt.cache_size < 0) opt.cache_size = 0; if (opt.cache_size > 2048) opt.cache_size = 2048; break; default: break; } Loading src/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ struct __fehoptions { /* signed in case someone wants to invert scrolling real quick */ int scroll_step; // imlib cache size in mebibytes int cache_size; unsigned int min_width, min_height, max_width, max_height; unsigned char mode; Loading Loading
man/feh.pre +10 −0 Original line number Diff line number Diff line Loading @@ -205,6 +205,16 @@ Zoom pictures to screen size in fullscreen / fixed geometry mode. . Create borderless windows. . .It Cm --cache-size Ar size . Set Imlib2 in-memory cache to .Ar size MiB. A higher cache size can significantly improve performance especially for small slide shows, however at the cost of increased memory consumption. .Ar size must be between 0 and 2048 MiB and defaults to 4. . .It Cm -P , --cache-thumbnails . Enable thumbnail caching in Loading
src/help.raw +1 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ OPTIONS --min-dimension WxH Only show images with width >= W and height >= H --max-dimension WxH Only show images with width <= W and height <= H --scroll-step COUNT scroll COUNT pixels when movement key is pressed --cache-size NUM imlib cache size in mebibytes (0 .. 2048) MONTAGE MODE OPTIONS -X, --ignore-aspect Set thumbnail to specified width/height without Loading
src/imlib.c +12 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,8 @@ void init_x_and_imlib(void) imlib_context_set_operation(IMLIB_OP_COPY); wmDeleteWindow = XInternAtom(disp, "WM_DELETE_WINDOW", False); imlib_set_cache_size(opt.cache_size * 1024 * 1024); /* Initialise random numbers */ srand(getpid() * time(NULL) % ((unsigned int) -1)); Loading Loading @@ -254,6 +256,16 @@ int feh_load_image(Imlib_Image * im, feh_file * file) return(0); } /* * By default, Imlib2 unconditionally loads a cached file without checking * if it was modified on disk. However, feh (or rather its users) should * expect image changes to appear at the next reload. So we tell Imlib2 to * always check the file modification time and only use a cached image if * the mtime was not changed. The performance penalty is usually negligible. */ imlib_context_set_image(*im); imlib_image_set_changes_on_disk(); #ifdef HAVE_LIBEXIF int orientation = 0; ExifData *exifData = exif_data_new_from_file(file->filename); Loading
src/options.c +10 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ void init_parse_options(int argc, char **argv) opt.jump_on_resort = 1; opt.screen_clip = 1; opt.cache_size = 4; #ifdef HAVE_LIBXINERAMA /* if we're using xinerama, then enable it by default */ opt.xinerama = 1; Loading Loading @@ -410,6 +411,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"xinerama-index", 1, 0, 239}, {"insecure" , 0, 0, 240}, {"no-recursive" , 0, 0, 241}, {"cache-size" , 1, 0, 243}, {0, 0, 0, 0} }; int optch = 0, cmdx = 0; Loading Loading @@ -772,6 +774,14 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) break; case 241: opt.recursive = 0; break; case 243: opt.cache_size = atoi(optarg); if (opt.cache_size < 0) opt.cache_size = 0; if (opt.cache_size > 2048) opt.cache_size = 2048; break; default: break; } Loading
src/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,9 @@ struct __fehoptions { /* signed in case someone wants to invert scrolling real quick */ int scroll_step; // imlib cache size in mebibytes int cache_size; unsigned int min_width, min_height, max_width, max_height; unsigned char mode; Loading