Go to file
Jamie McDonald bd544eb7d2 Save Exif data when you use the same source and destination URIs 2015-02-13 15:04:46 +01:00
.publishing Extract publishing stuff from build 2014-06-20 23:23:34 +02:00
example Ripple selector for done/cancel on v21 2015-01-09 15:59:45 +01:00
gradle/wrapper Bump versions for Lollipop and Android Studio 2014-12-30 00:01:17 +00:00
lib Save Exif data when you use the same source and destination URIs 2015-02-13 15:04:46 +01:00
.gitignore Gradle update 2014-06-13 10:53:12 +02:00
.travis.yml Expose generated Intent to allow custom start logic 2015-01-09 14:55:28 +01:00
CHANGELOG.md Updated changelog [skip ci] 2014-07-13 19:57:13 +02:00
README.md Updated README 2014-07-13 23:52:40 +02:00
build.gradle Bump versions for Lollipop and Android Studio 2014-12-30 00:01:17 +00:00
gradle.properties Bump version 2014-07-13 19:49:11 +02:00
gradlew Removed annotation dependency to make build work 2014-03-12 14:21:52 +01:00
gradlew.bat Empty project 2014-03-12 11:47:34 +01:00
screenshot.png Updated README & screenshot 2014-03-13 22:12:54 +01:00
settings.gradle Added empty example project 2014-03-12 12:33:18 +01:00

README.md

I guess people are just cropping out all the sadness

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

Build Status

Goals

  • Gradle build with AAR
  • Modern UI
  • Backwards compatible to Gingerbread
  • Simple builder for configuration
  • Example project
  • More tests, less unused complexity

Usage

First, declare CropImageActivity in your manifest file:

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

Crop

new Crop(inputUri).output(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);
    }
}

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:0.9.10@aar'

Apps

Apps that use this library include: SoundCloud, Depop

How does it look?

android-crop screenshot

License

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

Copyright 2014 SoundCloud
Apache License, Version 2.0