camera sensor 横装的情况下拍摄wall paper时,保存下来的图片有90度旋转
0赞[DESCRIPTION]
camera sensor 横装的情况下拍摄wall paper时,保存下来的图片有90度旋转
[SOLUTION]来自半导体社区
在camera sensor 横装的情况下拍摄wall paper时,MDI这边应该image_resolution设置为
MDI_CAMERA_CAP_SIZE_WALLPAPER,这样底层在生成照片时会自动将照片旋转90度以适应wall paper的需要,
但是在当前的设计中,MDI不会将image_resolution设置为MDI_CAMERA_CAP_SIZE_WALLPAPER,底层不会去
帮忙旋转照片,所以保存下来的照片会有90度旋转。
在mdi_camera_update_para_image_size()中
cap_size.image_resolution = camera_setting_p->image_resolution;
cap_size.image_width = camera_setting_p->image_width = image_width;
cap_size.image_height = camera_setting_p->image_height = image_height;
前面加上:
if (camera_setting_p->image_width == LCD_WIDTH && camera_setting_p->image_height == LCD_HEIGHT)
camera_setting_p->image_resolution = MDI_CAMERA_CAP_SIZE_WALLPAPER;