在一些手机(某星)上通过调用系统相机拍照生成的文件是有旋转角度(比如,音量键向下拍照是180度等)的。
所以直接处理这种图片是可能有问题的,因为可能出现了旋转(但是有些手机就是没有旋转的)。
但是我今天对这些直接调用系统相机拍照生成的文件再直接调用系统的裁减:
Intent intent = new Intent("com.android.camera.action.CROP");
发现进入裁剪的页面的图片旋转情况都是对的,
所以我想求证一下:进入裁剪页面的时候是不是系统已经帮我们做了对图片旋转的处理?
谢谢
Calling the system for cropping has already been rotated. You can also directly manually determine the angle of the file taken by the camera and then rotate it according to the angle to obtain a photo file with a normal angle. For angle determination, please refer to the ExifInterface class and its related methods. For rotation, It’s the combination of Bitmap and Matrix