【发布时间】:2014-01-11 10:01:30
【问题描述】:
有什么方法可以在 2.3 上实现从内置 android 库中挑选和裁剪图像? 我找到了这个库: com.android.camera.action.CROP alternative?
但它似乎只适用于 API lvl 15 及更高版本。
【问题讨论】:
标签: android crop android-gallery
有什么方法可以在 2.3 上实现从内置 android 库中挑选和裁剪图像? 我找到了这个库: com.android.camera.action.CROP alternative?
但它似乎只适用于 API lvl 15 及更高版本。
【问题讨论】:
标签: android crop android-gallery
有很多方法可以从相机中裁剪图像。 例如:通过对结果使用 Intent Activity:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString());
// ******** code for crop image
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 0);
intent.putExtra("aspectY", 0);
intent.putExtra("outputX", 200);
intent.putExtra("outputY", 150);
try {
intent.putExtra("return-data", true);
startActivityForResult(intent, PICK_FROM_CAMERA);
} catch (ActivityNotFoundException e) {
// Do nothing for now
}
}
或参考这些网站以获得更多帮助:
http://www.londatiga.net/featured-articles/how-to-select-and-crop-image-on-android/ http://www.androidhub4you.com/2012/07/how-to-crop-image-from-camera-and.html
【讨论】:
我使用了以下裁剪库。它真的很好,它支持2.3及以上。试试看。
【讨论】: