summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-06-29 19:13:35 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-06-29 19:14:28 +0200
commit1005e3bf7aa866d2abc0343845e72f72c044983d (patch)
treea8ddaa83ce2199da415c2e441c547476ef10c04d /src
parent22a627d02fd8d7c5564b89b739cbf368a3049c78 (diff)
feh_thumbnail_generate: pass-through for images <= thumbnail size
Diffstat (limited to 'src')
-rw-r--r--src/thumbnail.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/thumbnail.c b/src/thumbnail.c
index 79e5035..9ab727b 100644
--- a/src/thumbnail.c
+++ b/src/thumbnail.c
@@ -703,6 +703,13 @@ int feh_thumbnail_generate(Imlib_Image * image, feh_file * file,
thumb_h = td.cache_dim / ratio;
else if (ratio != 1.0)
thumb_w = td.cache_dim * ratio;
+ } else {
+ /*
+ * The image is smaller than the specified thumbnail size.
+ * Do not cache or transform it.
+ */
+ *image = im_temp;
+ return 1;
}
*image = gib_imlib_create_cropped_scaled_image(im_temp, 0, 0, w, h,