裁剪后图像质量下降

时间:2014-10-14 07:31:00

标签: android image camera crop

我正在使用相机意图捕获图像并将其发送到服务器。但问题是当我裁剪这个图像时,它的质量会大大降低。看起来很奇怪。我使用三星note 2进行测试,但裁剪后图像质量太差。任何人都可以分享一个好的裁剪代码,但不会降低其质量吗?这是我目前的裁剪图像代码。

public void performCrop(Uri picUri) {
    try {
        Intent cropIntent = new Intent("com.android.camera.action.CROP");
        cropIntent.setDataAndType(picUri, "image/* ");
        cropIntent.putExtra("crop", "true");
        cropIntent.putExtra("aspectX", 1);
        cropIntent.putExtra("aspectY", 1);
        cropIntent.putExtra("outputX", 200);
        cropIntent.putExtra("outputY", 200);
        cropIntent.putExtra("return-data", true);
        startActivityForResult(cropIntent, PIC_CROP);
    } catch (ActivityNotFoundException anfe) {

        String errorMessage = "Whoops - your device doesn't support the crop action!";
        toast(errorMessage);
    }

}

提前致谢。

0 个答案:

没有答案
相关问题