您的位置:首页 > 移动开发 > Android开发

GitHub android-crop 图片裁剪

2016-01-18 14:33 435 查看
146

 Star2,158
 Fork699


jdamcd/android-crop

 Code Issues 51 Pull
requests 16 Pulse Graphs

Android library project for cropping images

 204 commits

 3 branches

 12 releases

 19 contributors

 Java 100.0%

Java

New fileFind file
 

HTTPS 

 


 

Download ZIP

Branch: master 

New pull request

Latest commit 2db9b6e on
20 Nov 2015

 jdamcd Cleaning

.publishingExtract
publishing stuff from build
2 years ago
exampleAnother
Travis fix
4 months ago
gradle/wrapperBump
versions for Lollipop and Android Studio
a year ago
libCleaning2 months ago
.gitignoreGradle
update
2 years ago
.travis.ymlOverride
script to skip connectedCheck for now
4 months ago
CHANGELOG.mdCleaning2 months ago
README.mdCleaning2 months ago
build.gradleVersion
bumps & do less with Travis
4 months ago
gradle.propertiesUpdate
versions, README & CHANGELOG
4 months ago
gradlewRemoved
annotation dependency to make build work
2 years ago
gradlew.batEmpty
project
2 years ago
screenshot.png1.0.09 months ago
settings.gradleAdded
empty example project
2 years ago


 README.md

I guess people are just cropping out all the sadness

An Android library project that provides a simple image cropping 
Activity
,
based on code from AOSP.


 

 



Features

Gradle build & AAR
Modern UI
Backwards compatible to SDK 10
Simple builder for configuration
Example project


Usage

First, declare 
CropImageActivity
 in your manifest file:

<activity android:name="com.soundcloud.android.crop.CropImageActivity" />



Crop

Crop.of(inputUri, outputUri).asSquare().start(activity)


Listen for the result of the crop (see example project if you want to do some error handling):

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent result) {
if (requestCode == Crop.REQUEST_CROP && resultCode == RESULT_OK) {
doSomethingWithCroppedImage(outputUri);
}
}


Some attributes are provided to customise the crop screen. See the example project theme.


Pick

The library provides a utility method to start an image picker:

Crop.pickImage(activity)



Dependency

The AAR is published on Maven Central:

compile 'com.soundcloud.android:android-crop:1.0.1@aar'



Users

Apps that use this library include: SoundCloudDepopPolyvoreTextSecure


How
does it look?





License

This project is based on the AOSP camera image cropper via android-cropimage.
Copyright 2015 SoundCloud

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 http://www.apache.org/licenses/LICENSE-2.0 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: