成都创新互联网站制作重庆分公司

Android调用系统裁剪的实现方法-创新互联

Android调用系统裁剪,这个已经使用的很熟悉了。但是近期项目里使用的时候遇到了一些小问题,所以在此整理一下,以作记录。

创新互联建站专注于阜康企业网站建设,成都响应式网站建设公司,商城开发。阜康网站建设公司,为阜康等地区提供建站服务。全流程定制网站建设,专业设计,全程项目跟踪,创新互联建站专业和态度为您提供的服务

首先看代码:

Intent intent1 = new Intent("com.android.camera.action.CROP");
      intent1.setDataAndType(Uri.fromFile(new File(image.path)), "image/*");
      intent1.putExtra("crop", "true");
      intent1.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));//
      intent1.putExtra("aspectX", 1);
      intent1.putExtra("aspectY", 1);
      intent1.putExtra("outputFormat", Bitmap.CompressFormat.JPEG);
      intent1.putExtra("outputX", 720);
      intent1.putExtra("outputY", 720);
      intent1.putExtra("return-data", false);
      startActivityForResult(intent1, 0x222);

新闻标题:Android调用系统裁剪的实现方法-创新互联
网站URL:http://cxhlcq.com/article/dhsoog.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部