From: Seunghun Lee Date: Wed, 18 Nov 2020 06:28:05 +0000 (+0900) Subject: e_comp_wl_capture: correct image size according to orientation of image. X-Git-Tag: submit/tizen/20201119.103351^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F247978%2F2;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl_capture: correct image size according to orientation of image. When try to capture the image of buffer to which the output transform has been applied, should consider to swapping size. Change-Id: Ib0d8946e5f66c65743facda60de73301ee78862b --- diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index 8ddfc5f134..2d5c67e063 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -521,8 +521,20 @@ _e_capture_client_capture_with_video(Thread_Data *td) Eina_Bool ret = EINA_TRUE; main_surface = td->tbm_surface; - w = tbm_surface_get_width(main_surface); - h = tbm_surface_get_height(main_surface); + if ((td->transform == WL_OUTPUT_TRANSFORM_90) || + (td->transform == WL_OUTPUT_TRANSFORM_270) || + (td->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90) || + (td->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270)) + { + w = tbm_surface_get_height(main_surface); + h = tbm_surface_get_width(main_surface); + } + else + { + w = tbm_surface_get_width(main_surface); + h = tbm_surface_get_height(main_surface); + } + if ((w <= 0) || (h <= 0)) { ERR("Abnormal buffer size of main surface %dx%d", w, h);