From cd02f2dd86a8db621f47f7ec03d33c193c329f29 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Tue, 10 Jun 2014 21:28:10 +0200 Subject: Small fix for thumbnail cropping --- Makefile | 2 +- thumbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8320bb..35a19ae 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = git-20140609 +VERSION = git-20140610 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man diff --git a/thumbs.c b/thumbs.c index 0357836..5b1b069 100644 --- a/thumbs.c +++ b/thumbs.c @@ -284,7 +284,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file, w = imlib_image_get_width(); 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; zh = (float) ph / (float) h; if (zw < zh) { -- cgit v1.2.3-54-g00ecf