如何在未指定输出大小的情况下使用 com.android.camera.action.CROP?
How I can use com.android.camera.action.CROP with unspecified output size?
通常com.android.camera.action.CROP会显示设备的裁剪操作,我已经尝试过但它需要指定的输出大小。是否有任何最简单的方法来执行裁剪操作而无需指定输出大小,如 IsseiAoki/SimpleCropView or steelkiwi/cropiwa?
Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(picUri, "image/*");
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("outputX", 360);
cropIntent.putExtra("outputY", 360);
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, PIC_CROP);
Usually com.android.camera.action.CROP will show device's crop action
没有。它经常会因 ActivityNotFoundException
而崩溃。 Android does not have a CROP
Intent
,并且许多 Android 设备不会附带相机应用程序或任何其他提供 com.android.camera.action.CROP
的应用程序。除此之外,com.android.camera.action.CROP
未记录在案,因此哪些额外内容受到尊重,以及这些额外内容的含义将因 activity 而异。
Is there any simplest way to perform croping action without specified output size
查找并使用 an image-cropping library 提供您想要的功能集。您似乎在问题中列出了其中两个。
通常com.android.camera.action.CROP会显示设备的裁剪操作,我已经尝试过但它需要指定的输出大小。是否有任何最简单的方法来执行裁剪操作而无需指定输出大小,如 IsseiAoki/SimpleCropView or steelkiwi/cropiwa?
Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(picUri, "image/*");
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("outputX", 360);
cropIntent.putExtra("outputY", 360);
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, PIC_CROP);
Usually com.android.camera.action.CROP will show device's crop action
没有。它经常会因 ActivityNotFoundException
而崩溃。 Android does not have a CROP
Intent
,并且许多 Android 设备不会附带相机应用程序或任何其他提供 com.android.camera.action.CROP
的应用程序。除此之外,com.android.camera.action.CROP
未记录在案,因此哪些额外内容受到尊重,以及这些额外内容的含义将因 activity 而异。
Is there any simplest way to perform croping action without specified output size
查找并使用 an image-cropping library 提供您想要的功能集。您似乎在问题中列出了其中两个。