Loading src/imlib.c +26 −2 Original line number Diff line number Diff line Loading @@ -1204,6 +1204,26 @@ void feh_edit_inplace(winwidget w, int op) if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename) return; if (!opt.edit) { imlib_context_set_image(w->im); if (op == INPLACE_EDIT_FLIP) imlib_image_flip_vertical(); else if (op == INPLACE_EDIT_MIRROR) imlib_image_flip_horizontal(); else { imlib_image_orientate(op); tmp = w->im_w; w->im_w = w->im_h; w->im_h = tmp; if (FEH_FILE(w->file->data)->info) { FEH_FILE(w->file->data)->info->width = w->im_w; FEH_FILE(w->file->data)->info->height = w->im_h; } } winwidget_render_image(w, 1, 0); return; } if (!strcmp(gib_imlib_image_format(w->im), "jpeg") && !path_is_url(FEH_FILE(w->file->data)->filename)) { feh_edit_inplace_lossless(w, op); Loading Loading @@ -1241,8 +1261,12 @@ void feh_edit_inplace(winwidget w, int op) else { imlib_image_orientate(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; w->im_w = w->im_h; w->im_h = tmp; if (FEH_FILE(w->file->data)->info) { FEH_FILE(w->file->data)->info->width = w->im_w; FEH_FILE(w->file->data)->info->height = w->im_h; } } im_weprintf(w, "unable to edit in place. Changes have not been saved."); winwidget_render_image(w, 1, 0); Loading src/options.c +4 −0 Original line number Diff line number Diff line Loading @@ -398,6 +398,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"bg-fill" , 0, 0, 218}, {"bg-max" , 0, 0, 219}, {"no-jump-on-resort", 0, 0, 220}, {"edit" , 0, 0, 221}, #ifdef HAVE_LIBEXIF {"draw-exif" , 0, 0, 223}, {"auto-rotate" , 0, 0, 242}, Loading Loading @@ -730,6 +731,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) case 220: opt.jump_on_resort = 0; break; case 221: opt.edit = 1; break; #ifdef HAVE_LIBEXIF case 223: opt.draw_exif = 1; Loading src/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ struct __fehoptions { unsigned char keep_zoom_vp; unsigned char insecure_ssl; unsigned char filter_by_dimensions; unsigned char edit; char *output_file; char *output_dir; Loading Loading
src/imlib.c +26 −2 Original line number Diff line number Diff line Loading @@ -1204,6 +1204,26 @@ void feh_edit_inplace(winwidget w, int op) if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename) return; if (!opt.edit) { imlib_context_set_image(w->im); if (op == INPLACE_EDIT_FLIP) imlib_image_flip_vertical(); else if (op == INPLACE_EDIT_MIRROR) imlib_image_flip_horizontal(); else { imlib_image_orientate(op); tmp = w->im_w; w->im_w = w->im_h; w->im_h = tmp; if (FEH_FILE(w->file->data)->info) { FEH_FILE(w->file->data)->info->width = w->im_w; FEH_FILE(w->file->data)->info->height = w->im_h; } } winwidget_render_image(w, 1, 0); return; } if (!strcmp(gib_imlib_image_format(w->im), "jpeg") && !path_is_url(FEH_FILE(w->file->data)->filename)) { feh_edit_inplace_lossless(w, op); Loading Loading @@ -1241,8 +1261,12 @@ void feh_edit_inplace(winwidget w, int op) else { imlib_image_orientate(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; w->im_w = w->im_h; w->im_h = tmp; if (FEH_FILE(w->file->data)->info) { FEH_FILE(w->file->data)->info->width = w->im_w; FEH_FILE(w->file->data)->info->height = w->im_h; } } im_weprintf(w, "unable to edit in place. Changes have not been saved."); winwidget_render_image(w, 1, 0); Loading
src/options.c +4 −0 Original line number Diff line number Diff line Loading @@ -398,6 +398,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"bg-fill" , 0, 0, 218}, {"bg-max" , 0, 0, 219}, {"no-jump-on-resort", 0, 0, 220}, {"edit" , 0, 0, 221}, #ifdef HAVE_LIBEXIF {"draw-exif" , 0, 0, 223}, {"auto-rotate" , 0, 0, 242}, Loading Loading @@ -730,6 +731,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) case 220: opt.jump_on_resort = 0; break; case 221: opt.edit = 1; break; #ifdef HAVE_LIBEXIF case 223: opt.draw_exif = 1; Loading
src/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ struct __fehoptions { unsigned char keep_zoom_vp; unsigned char insecure_ssl; unsigned char filter_by_dimensions; unsigned char edit; char *output_file; char *output_dir; Loading