Small fix for thumbnail cropping

This commit is contained in:
Bert Münnich 2014-06-10 21:28:10 +02:00
parent d26f39914e
commit cd02f2dd86
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,4 @@
VERSION = git-20140609 VERSION = git-20140610
PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man MANPREFIX = $(PREFIX)/share/man

View file

@ -284,7 +284,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file,
w = imlib_image_get_width(); w = imlib_image_get_width();
h = imlib_image_get_height(); h = imlib_image_get_height();
if (pw > w && ph > h) { if (pw > w && ph > h && (pw - ph >= 0) == (w - h >= 0)) {
zw = (float) pw / (float) w; zw = (float) pw / (float) w;
zh = (float) ph / (float) h; zh = (float) ph / (float) h;
if (zw < zh) { if (zw < zh) {