unsigned int start_x = 0;
unsigned int start_y = 0;
if (angle == MM_UTIL_ROTATE_90) {
- start_x = 0;
+ start_x = _imgp_info_s->output_stride - _imgp_info_s->dst_width;
start_y = 0;
} else if (angle == MM_UTIL_ROTATE_180) {
- start_x = _imgp_info_s->output_stride-_imgp_info_s->dst_width;
- start_y = 0;
+ start_x = _imgp_info_s->output_stride - _imgp_info_s->dst_width;
+ start_y = _imgp_info_s->output_elevation - _imgp_info_s->dst_height;
} else if (angle == MM_UTIL_ROTATE_270) {
start_x = 0;
start_y = _imgp_info_s->output_elevation - _imgp_info_s->dst_height;
goto ERROR;
}
- ret = mm_util_crop_image(_rotate_image, 0, 0, start_x, start_y, dst);
+ ret = mm_util_crop_image(_rotate_image, start_x, start_y, _imgp_info_s->dst_width, _imgp_info_s->dst_height, dst);
mm_image_destroy_image(_rotate_image);
if (ret != MM_UTIL_ERROR_NONE) {
mm_util_error("mm_util_crop_image failed");