From b9f79e0f99cd96b79c903c391198046c1e9939d5 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 29 May 2020 23:51:26 +0200 Subject: Fix lossless rotate for Imlib2 ≥ 1.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #532 --- src/imlib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/imlib.c b/src/imlib.c index 5034be8..e06a813 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -1394,8 +1394,10 @@ void feh_edit_inplace(winwidget w, int op) return; } - if (!strcmp(gib_imlib_image_format(w->im), "jpeg") && - !path_is_url(FEH_FILE(w->file->data)->filename)) { + // Imlib2 <= 1.5 returns "jpeg", Imlib2 >= 1.6 uses "jpg" + if ((!strcmp(gib_imlib_image_format(w->im), "jpeg") + || !strcmp(gib_imlib_image_format(w->im), "jpg")) + && !path_is_url(FEH_FILE(w->file->data)->filename)) { feh_edit_inplace_lossless(w, op); feh_reload_image(w, 1, 1); return; -- cgit v1.2.3