Android的 - 裁剪图片这么多的缩放和寻找blurre [英] Android - Cropped image so much zoomed and looking blurre

查看:120
本文介绍了Android的 - 裁剪图片这么多的缩放和寻找blurre的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下code裁剪从相机拍摄的图像:

 意向意图=新意图(com.android.camera.action.CROP);
意图.setDataAndType(outputFileUri,图像/ *);
intent.putExtra(outputX,600);
intent.putExtra(outputY,600);
intent.putExtra(aspectX,1);
intent.putExtra(aspectY,1);
intent.putExtra(规模化,真正的);
intent.putExtra(回归数据,FALSE);
startActivityForResult(意向,2);

我的问题是:


  1. 图像裁切是在某些设备好,在某些设备上的应用程序是crashing.So如何处理这种情况?


  2. 另一件事是,裁剪图像过多放大并获得blurre。



解决方案

过大的照片引起死机,请参阅本如何农作物大照片

I am using following code to crop an image taken from the camera:

Intent intent = new Intent("com.android.camera.action.CROP");              
intent .setDataAndType(outputFileUri, "image/*");
intent.putExtra("outputX",600);
intent.putExtra("outputY", 600);
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("scale", true);
intent.putExtra("return-data", false); 
startActivityForResult(intent, 2);

My problems are:

  1. Image cropping is working good on some devices and on some devices app is crashing.So how to handle this condition?

  2. Another thing is that cropped image too much zoomed and getting blurre.

解决方案

Too large photo causes crash, see this how to crop large photos.

这篇关于Android的 - 裁剪图片这么多的缩放和寻找blurre的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆