const int y_offset_prog_bar_img_pos = 355;
int rotate_angle = 0;
int rollback_rotate_angle = 0;
+int img_buf_width = 0;
+int img_buf_height = 0;
FbInfo s_fbi;
tdm_if_disp s_disp;
/* create tbm_surface for original image */
tbm_surface_h tbm_surface_ori = NULL;
tbm_surface_info_s surface_info_ori;
- tbm_surface_ori = tbm_surface_create(fbi->w, fbi->h, TBM_FORMAT_ARGB8888); // rotated width, height
+ tbm_surface_ori = tbm_surface_create(img_buf_width, img_buf_height, TBM_FORMAT_ARGB8888); // rotated width, height
if(!tbm_surface_ori){
LOG("failed to tbm_surface_create\n");
}
rotate_angle = ROTATE;
LOG("Print Rotate Angle value = %d\n", rotate_angle);
rollback_rotate_angle = 360 - rotate_angle;
+
+ int rotate_step = (rotate_angle + 360) / 90 % 4;
+ if (rotate_step % 2 == 0) {
+ img_buf_width = s_fbi.w;
+ img_buf_height = s_fbi.h;
+ } else {
+ img_buf_width = s_fbi.h;
+ img_buf_height = s_fbi.w;
+ }
+ LOG("Print Img buffer(=image w,h) width = %d, height = %d\n", img_buf_width, img_buf_height);
}
/*-----------------------------------------------------------------------------