Ephoto: Rename Cartoon filter to Painting filter as that is more accurate.

master
Stephen okra Houston 6 years ago
parent 6ce5ec3277
commit 4ef7efdc4c
  1. 2
      src/bin/ephoto.h
  2. 11
      src/bin/ephoto_filters.c
  3. 16
      src/bin/ephoto_single_browser.c
  4. 2
      src/bin/ephoto_slideshow.c

@ -145,7 +145,7 @@ void ephoto_filter_blur(Evas_Object *main, Evas_Object *image);
void ephoto_filter_sharpen(Evas_Object *main, Evas_Object *image);
void ephoto_filter_black_and_white(Evas_Object *main, Evas_Object *image);
void ephoto_filter_old_photo(Evas_Object *main, Evas_Object *image);
void ephoto_filter_cartoon(Evas_Object *main, Evas_Object *image);
void ephoto_filter_painting(Evas_Object *main, Evas_Object *image);
void ephoto_filter_posterize(Evas_Object *main, Evas_Object *image);
void ephoto_filter_sketch(Evas_Object *main, Evas_Object *image);
void ephoto_filter_invert(Evas_Object *main, Evas_Object *image);

@ -6,10 +6,10 @@ typedef struct _Ephoto_Filter Ephoto_Filter;
enum _Ephoto_Image_Filter
{
EPHOTO_IMAGE_FILTER_BLUR,
EPHOTO_IMAGE_FILTER_CARTOON,
EPHOTO_IMAGE_FILTER_EQUALIZE,
EPHOTO_IMAGE_FILTER_GRAYSCALE,
EPHOTO_IMAGE_FILTER_INVERT,
EPHOTO_IMAGE_FILTER_PAINTING,
EPHOTO_IMAGE_FILTER_POSTERIZE,
EPHOTO_IMAGE_FILTER_SEPIA,
EPHOTO_IMAGE_FILTER_SHARPEN,
@ -244,9 +244,9 @@ _blur(void *data)
int a, r, g, b, rad, passes = 0;
int *as, *rs, *gs, *bs;
im_data = ef->im_data;
w = ef->w;
h = ef->h;
im_data = ef->im_data;
rad = ef->rad;
as = malloc(sizeof(int) * w);
@ -335,7 +335,6 @@ _blur(void *data)
free(rs);
free(gs);
free(bs);
_idler_finishing_cb(ef, EINA_FALSE);
return EINA_FALSE;
@ -819,12 +818,12 @@ ephoto_filter_posterize(Evas_Object *main, Evas_Object *image)
}
void
ephoto_filter_cartoon(Evas_Object *main, Evas_Object *image)
ephoto_filter_painting(Evas_Object *main, Evas_Object *image)
{
Ephoto_Filter *ef = _initialize_filter(EPHOTO_IMAGE_FILTER_CARTOON,
Ephoto_Filter *ef = _initialize_filter(EPHOTO_IMAGE_FILTER_PAINTING,
main, image);
ef->rad = 9;
ef->rad = 5;
ef->drad = 5.0;
ef->qpos = 0;
ef->qcount = 1;

@ -1182,7 +1182,7 @@ _go_posterize(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
_go_cartoon(void *data, Evas_Object *obj EINA_UNUSED,
_go_painting(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Ephoto_Single_Browser *sb = data;
@ -1192,7 +1192,7 @@ _go_cartoon(void *data, Evas_Object *obj EINA_UNUSED,
sb->editing = EINA_TRUE;
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
ephoto_filter_cartoon(sb->main, v->image);
ephoto_filter_painting(sb->main, v->image);
}
}
@ -1297,7 +1297,6 @@ _viewer_add(Evas_Object *parent, const char *path, Ephoto_Single_Browser *sb)
evas_object_show(v->table);
v->image = elm_image_add(v->table);
elm_object_style_set(v->image, "ephoto");
elm_image_preload_disabled_set(v->image, EINA_TRUE);
elm_image_file_set(v->image, path, group);
err = evas_object_image_load_error_get(elm_image_object_get(v->image));
@ -1483,19 +1482,20 @@ _add_edit_menu_items(Ephoto_Single_Browser *sb, Evas_Object *menu)
NULL);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Black and White"),
_go_black_and_white, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Blur"), _go_blur, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Cartoon"),
_go_cartoon, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Blur"),
_go_blur, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Edge Detect"),
_go_edge, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Invert Colors"),
_go_invert, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Old Photo"),
_go_old_photo, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Painting"),
_go_painting, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Posterize"),
_go_posterize, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Sharpen"), _go_sharpen,
sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Sharpen"),
_go_sharpen, sb);
elm_menu_item_add(menu, menu_itt, "insert-image", _("Sketch"),
_go_sketch, sb);

@ -384,9 +384,7 @@ _slideshow_item_get(void *data, Evas_Object *obj)
}
}
Evas_Object *image = elm_image_add(obj);
elm_image_file_set(image, entry->path, group);
elm_object_style_set(image, "shadow");
evas_object_event_callback_add(image, EVAS_CALLBACK_SHOW, _image_shown,
entry);

Loading…
Cancel
Save