[JIRA 1864] Resolved Wallpaper Gallery Image Not Displaying Issue 36/244336/2 submit/tizen/20200917.110414
authorallu.k <allu.k@samsung.com>
Thu, 17 Sep 2020 10:17:50 +0000 (15:47 +0530)
committerallu.k <allu.k@samsung.com>
Thu, 17 Sep 2020 10:55:52 +0000 (16:25 +0530)
Change-Id: I3e90bf0daa92a1135793610ddc97eb6f2dde98f4

src/main/control/ivug-crop-ug.cpp

index 21ac0418905abc4407ba9b4cd398d040fa47a6a4..9f1b59069fa52a3884ad0b7f46a44cb70a13b537 100644 (file)
@@ -1024,7 +1024,8 @@ static void ivug_rotate_image(char *name, int degree)
  */
 static void callback_cb(media_packet_h *dst, int error_code, void *user_data)
 {
-       if (error_code != IMAGE_UTIL_ERROR_NONE || dst == NULL) {
+       /*Sending the current Image path to wallpaper-ui as RPI3 is unable to handle image transformation*/ 
+       /*if (error_code != IMAGE_UTIL_ERROR_NONE || dst == NULL) {
                MSG_IMAGEVIEW_ERROR("An error occurred during transformation. Error code: %d.", error_code);
                return;
        }
@@ -1121,45 +1122,42 @@ static void callback_cb(media_packet_h *dst, int error_code, void *user_data)
        if (ret != IMAGE_UTIL_ERROR_NONE) {
                MSG_IMAGEVIEW_ERROR("Inside callback....Unable to encode %d.", ret);
                return;
+       }*/
+       int ret=0;
+       snprintf(image_util_filename_encoded, 1024, "%s", img_path);
+       app_control_h service = NULL;
+       ret = app_control_create(&service);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_MAIN_HIGH("app_control_create failed");
+               return;
        }
 
-       if (global_rect->is_camera_image)
-               ivug_rotate_image(image_util_filename_encoded, global_rect->rotation);
-       else {
-               app_control_h service = NULL;
-               ret = app_control_create(&service);
-               if (ret != APP_CONTROL_ERROR_NONE) {
-                       MSG_MAIN_HIGH("app_control_create failed");
-                       return;
-               }
-
-               ret = app_control_add_extra_data(service, "Result", image_util_filename_encoded);
-               if (ret != APP_CONTROL_ERROR_NONE) {
-                       MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
-                       app_control_destroy(service);
-                       return;
-               }
-
-               ret = app_control_add_extra_data(service, APP_CONTROL_DATA_SELECTED, image_util_filename_encoded);
-               if (ret != APP_CONTROL_ERROR_NONE) {
-                       MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
-                       app_control_destroy(service);
-                       return;
-               }
-
-               ret = app_control_add_extra_data(gGetServiceHandle(), APP_CONTROL_DATA_SELECTED, image_util_filename_encoded);
-               if (ret != APP_CONTROL_ERROR_NONE) {
-                       MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
-                       app_control_destroy(service);
-                       return;
-               }
+       ret = app_control_add_extra_data(service, "Result", image_util_filename_encoded);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
+               app_control_destroy(service);
+               return;
+       }
 
-               app_control_reply_to_launch_request(service, gGetServiceHandle(), APP_CONTROL_RESULT_SUCCEEDED);
+       ret = app_control_add_extra_data(service, APP_CONTROL_DATA_SELECTED, image_util_filename_encoded);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
+               app_control_destroy(service);
+               return;
+       }
 
+       ret = app_control_add_extra_data(gGetServiceHandle(), APP_CONTROL_DATA_SELECTED, image_util_filename_encoded);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               MSG_MAIN_HIGH("app_control_add_extra_data()... [0x%x]", ret);
                app_control_destroy(service);
-               DESTROY_ME();
-               elm_exit();
+               return;
        }
+
+       app_control_reply_to_launch_request(service, gGetServiceHandle(), APP_CONTROL_RESULT_SUCCEEDED);
+
+       app_control_destroy(service);
+       DESTROY_ME();
+       elm_exit();
 }
 
 /**
@@ -1171,7 +1169,8 @@ static void callback_cb(media_packet_h *dst, int error_code, void *user_data)
  */
 void ivug_crop_on_save_btn_clicked(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
-       if (global_rect == NULL) {
+       /*Will implement crop feature based on GUI requirement in future*/
+       /*if (global_rect == NULL) {
                return;
        }
        elm_object_disabled_set(obj, EINA_TRUE);
@@ -1380,12 +1379,12 @@ void ivug_crop_on_save_btn_clicked(void *data, Evas_Object *obj, const char *emi
                MSG_IMAGEVIEW_ERROR("image_util_transform_set_crop_area() returned error code %d", ret);
                return;
        }
-
        ret = image_util_transform_run(handle, packet, (image_util_transform_completed_cb)callback_cb, NULL);
        if (ret != IMAGE_UTIL_ERROR_NONE) {
                MSG_IMAGEVIEW_ERROR("image_util_transform_run() returned error code %d", ret);
                return;
-       }
+       }*/
+       callback_cb(NULL,0,NULL);
 }
 
 /**