android开发三星手机拍照
来源:互联网 发布:阿里云空间怎么购买 编辑:程序博客网 时间:2024/04/24 17:31
android开发三星手机拍照旋转数据丢失
解决方法:
<--在AndroidManifest.xml设置属性,这样activity横竖屏切换生命周期不会重走--><activity android:name=".xxx.xxxActivity"android:configChanges="orientation|screenSize" android:screenOrientation="portrait" />
照片拍完被旋转的解决方法:
/** * 读取图片属性:旋转的角度 * @param path 图片绝对路径 * @return degree旋转的角度 */ public static int readPictureDegree(String path) { int degree = 0; try { ExifInterface exifInterface = new ExifInterface(path); int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: degree = 90; break; case ExifInterface.ORIENTATION_ROTATE_180: degree = 180; break; case ExifInterface.ORIENTATION_ROTATE_270: degree = 270; break; } } catch (IOException e) { e.printStackTrace(); } return degree; } /* * 旋转图片 * @param angle * @param bitmap * @return Bitmap */ public static Bitmap rotaingImageView(int angle , Bitmap bitmap) { //旋转图片 动作 Matrix matrix = new Matrix();; matrix.postRotate(angle); System.out.println("angle2=" + angle); // 创建新的图片 Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); return resizedBitmap; }
0 0
- android开发三星手机拍照
- Android开发中三星手机拍照异常处理
- android 三星手机拍照报错
- Android 三星手机拍照图片旋转处理
- android解决三星手机拍照获取图片的问题
- android 三星手机拍照裁剪后会旋转问题
- Android 三星手机拍照无法收到回调问题
- Android三星手机拍照自动旋转问题解决方案
- android三星等手机拍照自动旋转问题与解决
- 三星手机拍照旋转问题
- Android 相机开发 三星拍照崩溃修改解决 详细
- Android 相机开发 三星拍照崩溃修改解决 详细
- android Camera开发-手机拍照流程
- 三星手机拍照崩溃问题(转发)
- andriod 三星手机拍照各种奇葩问题
- 三星手机拍照后 图片翻转
- 真正解决三星等手机拍照问题
- 三星手机拍照回调拿不到路径
- 多线程-8、dispatch队列
- 23种设计模式——抽象工厂模式
- 动态代理proxy与CGLib
- linux 下查找文件或者内容常有命令
- Dapp开发教程四 Asch Dapp Dice Game
- android开发三星手机拍照
- mysql产生随机数
- 方法的重写
- Linux_扩大VMware虚拟机中linux硬盘空间
- Web网站架构进化过程
- 如何让孩子爱上设计模式 —— 4.原型模式(Prototype Pattern)
- SpringMVC中整合bootstrap实现分栏,iframe实现点击左侧菜单改变右侧内容或点击上面菜单改变下面内容,地址栏内容不变。附源码!!!
- 我的收款二维码
- PHP打包下载整个文件夹或多文件