Android 图片裁剪库 uCrop
- 授权协议: Apache
- 开发语言: Java
- 操作系统: Android
- 软件首页: https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
- 软件文档: https://github.com/Yalantis/uCrop/blob/master/README.md
- 官方下载: https://github.com/Yalantis/uCrop/archive/master.zip
软件介绍
uCrop 是[Yalantis](https://yalantis.com/) 组织开源的图片裁剪库, 支持缩放, 旋转图片, 支持各种比例的裁剪框, 非常强大的一个图片裁剪库。
使用
1. 添加包.
compile 'com.yalantis:ucrop:1.3.+'
2. 注册 UCropActivity 在 AndroidManifest.xml中
<activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
3. 代码设置
UCrop.of(sourceUri, destinationUri) .withAspectRatio(16, 9) .withMaxResultSize(maxWidth, maxHeight) .start(context);
4. 实现继承的方法
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK && requestCode == UCrop.REQUEST_CROP) {
final Uri resultUri = UCrop.getOutput(data);
} else if (resultCode == UCrop.RESULT_ERROR) {
final Throwable cropError = UCrop.getError(data);
}
}
About Face 3
Alan Cooper、Robert Reimann、David Cronin / John Wiley & Sons / 2007-5-15 / GBP 28.99
* The return of the authoritative bestseller includes all new content relevant to the popularization of how About Face maintains its relevance to new Web technologies such as AJAX and mobile platforms......一起来看看 《About Face 3》 这本书的介绍吧!

