From 1005e3bf7aa866d2abc0343845e72f72c044983d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 29 Jun 2024 19:13:35 +0200 Subject: feh_thumbnail_generate: pass-through for images <= thumbnail size --- src/thumbnail.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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, -- cgit v1.2.3