summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@gmx.com>2011-11-05 13:11:50 +0100
committerBert Münnich <ber.t@gmx.com>2011-11-05 13:11:50 +0100
commit5034792948e181de5f1f19737cccc394116a82b4 (patch)
treec6b88def2bf0eb7ccc7edb9ccb81e999cd0c9b98 /thumbs.c
parent71a7940d74459c8a575100f93fe43e204413c2db (diff)
downloadnsxiv-5034792948e181de5f1f19737cccc394116a82b4.tar.zst
Thumbnails only get scaled down, fixed issue #27
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thumbs.c b/thumbs.c
index 69b2645..2540d25 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -267,6 +267,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file,
zw = (float) THUMB_SIZE / (float) w;
zh = (float) THUMB_SIZE / (float) h;
z = MIN(zw, zh);
+ z = MIN(z, 1.0);
t->w = z * w;
t->h = z * h;