summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-02-14 22:35:06 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-02-14 22:35:06 +0100
commit14a9702bb2365e51a6f8854f85a13b6e5cf4001c (patch)
tree6a6c396f017f4e4c10794d74e3550481be580477 /src/imlib.c
parent4abbd21f698945a662ed57e2dad6b6b25de9e474 (diff)
parent5e75b5ef3e7d0270913c04645398bc3596c2a90a (diff)
Merge branch 'ulteq-dimension-pruning-without-preload'
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 6de6bdb..d9c5cd0 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -139,6 +139,18 @@ void init_x_and_imlib(void)
return;
}
+int feh_should_ignore_image(Imlib_Image * im)
+{
+ if (opt.filter_by_dimensions) {
+ unsigned int w = gib_imlib_image_get_width(im);
+ unsigned int h = gib_imlib_image_get_height(im);
+ if (w < opt.min_width || w > opt.max_width || h < opt.min_height || h > opt.max_height) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
int feh_load_image_char(Imlib_Image * im, char *filename)
{
feh_file *file;