Merge text and image as a single image

Merge text and image as a single image

BY 17 Oct 2017 Native Application Development

How to merge background image and text written on it, and user can download as a single(merged) image?

Here is my code which contains image in bg and text on it. Iwant to merge both and make one image which user can download.

char buf[PATH_MAX];
const char *path = app_get_resource_path();
sprintf(buf,"%simg.jpg",path);

ad->bg=elm_bg_add(table);
elm_bg_file_set(ad->bg,buf,NULL);
elm_bg_option_set(ad->bg,ELM_BG_OPTION_SCALE);
my_table_pack(table,ad->bg,0,0,19,18);

Evas_Object *bg2=elm_bg_add(table);
evas_object_color_set(bg2,0,0,0,130);
elm_bg_option_set(bg2,ELM_BG_OPTION_SCALE);
my_table_pack(table,bg2,0,0,19,18);

ad->label = elm_entry_add(bg2);
elm_entry_editable_set(ad->label,EINA_FALSE);
elm_entry_text_set(ad->label,"hello world");
my_table_pack(table,ad->label,2,6,16,8);

 

Written by