diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-07-22 22:54:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-07-22 22:54:19 +0200 |
commit | 420f05e406c2682054e8b3f59cc3cb26a68d07f4 (patch) | |
tree | 3e74fbfe960dd723d77eb9909982af4f309736b2 /src | |
parent | 7d5db068a7e594117baffa6ccf591728f64991ac (diff) |
I may have fixed rotate etc. on remote images (not magick ones, though)
Diffstat (limited to 'src')
-rw-r--r-- | src/imlib.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/imlib.c b/src/imlib.c index 90188e1..cefb918 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -1021,20 +1021,37 @@ void feh_display_status(char stat) void feh_edit_inplace(winwidget w, int op) { - int ret; + int tmp; Imlib_Image old; Imlib_Load_Error err; if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename) return; + if (path_is_url(FEH_FILE(w->file->data)->filename)) { + if (op == INPLACE_EDIT_FLIP) { + imlib_context_set_image(w->im); + imlib_image_flip_vertical(); + } else if (op == INPLACE_EDIT_MIRROR) { + imlib_context_set_image(w->im); + imlib_image_flip_horizontal(); + } else { + gib_imlib_image_orientate(w->im, op); + tmp = w->im_w; + FEH_FILE(w->file->data)->info->width = w->im_w = w->im_h; + FEH_FILE(w->file->data)->info->height = w->im_h = tmp; + } + winwidget_render_image(w, 1, 0); + return; + } + if (!strcmp(gib_imlib_image_format(w->im), "jpeg")) { feh_edit_inplace_lossless(w, op); feh_reload_image(w, 1, 1); return; } - ret = feh_load_image(&old, FEH_FILE(w->file->data)); - if (ret) { + tmp = feh_load_image(&old, FEH_FILE(w->file->data)); + if (tmp) { if (op == INPLACE_EDIT_FLIP) { imlib_context_set_image(old); imlib_image_flip_vertical(); |