summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-05-29 23:51:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-05-29 23:54:04 +0200
commitb9f79e0f99cd96b79c903c391198046c1e9939d5 (patch)
tree66c53ff5aeeeb1e4f45934fa769de4ff3e072fc0 /src/imlib.c
parentc9e024daeb43094696a05c8d03ef6682ed683dae (diff)
Fix lossless rotate for Imlib2 ≥ 1.6
Closes #532
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c6
1 files 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;