【问题标题】:Cropped image is blurry in android裁剪的图像在android中模糊
【发布时间】:2013-08-19 15:34:46
【问题描述】:

我正在尝试裁剪从 an​​droid 中的图库中选择的图像,如下所示。

Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(photoUri, "image/*");         
intent.putExtra("outputX", 400);
intent.putExtra("outputY", 300);
intent.putExtra("aspectX", 4);
intent.putExtra("aspectY", 3);
intent.putExtra("scale", true);
intent.putExtra("return-data", true);
startActivityForResult(intent, RESULT_CROP);

当我尝试将 outputX 和 outputY 设置为 800、600 时,它不起作用。上面的代码工作正常,但裁剪后的图像看起来很模糊。任何人都可以建议如何裁剪图像而不会使其太模糊。 谢谢。

【问题讨论】:

标签: java android image crop


【解决方案1】:

您应该改用其中一个可用的库。例如: https://github.com/jdamcd/android-crop

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-14
    • 1970-01-01
    • 2015-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多