Thumbnails only get scaled down, fixed issue #27

This commit is contained in:
Bert Münnich 2011-11-05 13:11:50 +01:00
parent 71a7940d74
commit 5034792948
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,4 @@
VERSION = git-20111101 VERSION = git-20111105
CC = gcc CC = gcc
CFLAGS = -ansi -Wall -pedantic -O2 CFLAGS = -ansi -Wall -pedantic -O2

View file

@ -267,6 +267,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file,
zw = (float) THUMB_SIZE / (float) w; zw = (float) THUMB_SIZE / (float) w;
zh = (float) THUMB_SIZE / (float) h; zh = (float) THUMB_SIZE / (float) h;
z = MIN(zw, zh); z = MIN(zw, zh);
z = MIN(z, 1.0);
t->w = z * w; t->w = z * w;
t->h = z * h; t->h = z * h;