Krolyxon
Commit cd02f2d

Branches

Refs →

nsxivcd02f2d

Small fix for thumbnail cropping

Author
Bert Münnich
Date
2014-06-10 21:28 +0200
Parent
d26f399
Commit
cd02f2dd86a8db621f47f7ec03d33c193c329f29

+2 −2

2 files changed

  1. M Makefile +1 −1
  2. M thumbs.c +1 −1
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20140609
1+VERSION = git-20140610
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M thumbs.c View
@@ -284,7 +284,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file,
284284 w = imlib_image_get_width();
285285 h = imlib_image_get_height();
286286
287− if (pw > w && ph > h) {
287+ if (pw > w && ph > h && (pw - ph >= 0) == (w - h >= 0)) {
288288 zw = (float) pw / (float) w;
289289 zh = (float) ph / (float) h;
290290 if (zw < zh) {