Giter Site home page Giter Site logo

yalantis / ucrop Goto Github PK

View Code? Open in Web Editor NEW
11.8K 257.0 2.1K 61.08 MB

Image Cropping Library for Android

Home Page: https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/

Java 98.17% Makefile 0.20% C++ 1.63%
android java image photo crop animation scale rotation

ucrop's Introduction

uCrop - Image Cropping Library for Android

This project aims to provide an ultimate and flexible image cropping experience. Made in Yalantis

Usage

For a working implementation, please have a look at the Sample Project - sample

Get it on Google Play

  1. Include the library as a local library project.

    allprojects {
       repositories {
          jcenter()
          maven { url "https://jitpack.io" }
       }
    }
    

    implementation 'com.github.yalantis:ucrop:2.2.8' - lightweight general solution

    implementation 'com.github.yalantis:ucrop:2.2.8-native' - get power of the native code to preserve image quality (+ about 1.5 MB to an apk size)

  2. Add UCropActivity into your AndroidManifest.xml

    <activity
        android:name="com.yalantis.ucrop.UCropActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
    
  3. The uCrop configuration is created using the builder pattern.

    UCrop.of(sourceUri, destinationUri)
        .withAspectRatio(16, 9)
        .withMaxResultSize(maxWidth, maxHeight)
        .start(context);
  4. Override onActivityResult method and handle uCrop result.

    @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);
        }
    }
  5. You may want to add this to your PROGUARD config:

    -dontwarn com.yalantis.ucrop**
    -keep class com.yalantis.ucrop** { *; }
    -keep interface com.yalantis.ucrop** { *; }
    

Customization

If you want to let your users choose crop ratio dynamically, just do not call withAspectRatio(x, y).

uCrop builder class has method withOptions(UCrop.Options options) which extends library configurations.

Currently, you can change:

  • image compression format (e.g. PNG, JPEG), compression
  • image compression quality [0 - 100]. PNG which is lossless, will ignore the quality setting.
  • whether all gestures are enabled simultaneously
  • maximum size for Bitmap that is decoded from source Uri and used within crop view. If you want to override the default behaviour.
  • toggle whether to show crop frame/guidelines
  • setup color/width/count of crop frame/rows/columns
  • choose whether you want rectangle or oval(options.setCircleDimmedLayer(true)) crop area
  • the UI colors (Toolbar, StatusBar, active widget state)
  • and more...

Compatibility

  • Library - Android ICS 4.0+ (API 14) (Android GINGERBREAD 2.3+ (API 10) for versions <= 1.3.2)
  • Sample - Android ICS 4.0+ (API 14)
  • CPU - armeabi armeabi-v7a x86 x86_64 arm64-v8a (for versions >= 2.1.2)

Changelog

Version: 2.2.9

  • Update compileSdk and targetSdk versions up to 33
  • Fixed #867
  • Fixed #873
  • And other improvements

Version: 2.2.8

  • Merged pending pull requests with improvements and bugfixes
  • Update compileSdk and targetSdk versions up to 31
  • Add localizations
  • Fixed #609
  • Fixed #794

Version: 2.2.5

Version: 2.2.4

  • AndroidX migration
  • Redesign
  • Several fixes including #550

Version: 2.2.3

  • Several fixes including #445, #465 and more!
  • Material design support
  • uCrop fragment as child fragment
  • Added the Italian language

Version: 2.2.2

  • uCrop fragment added
  • bugfix

Version: 2.2.1

  • Fix including #285

Version: 2.2

Version: 2.1

  • Fixes issue with EXIF data (images taken on front camera with Samsung devices mostly) #130 #111
  • Added API to set custom set of aspect ratio options for the user. #131
  • Added API to set all configs via UCrop.Options class. #126
  • Added ABI x86_64 support. #105

Version: 2.0

  • Native image crop (able to crop high-resolution images, e.g. 16MP & 32MP images on Nexus 5X).
  • WebP compression format is not supported at the moment (choose JPEG or PNG).
  • Now library copies EXIF data to cropped image (size and orientation are updated).

Version: 1.5

  • Introduced "Freestyle" crop (you can resize crop rectangle by dragging it corners) #32
  • Now image & crop view paddings are not associated #68
  • Updated API

Version: 1.4

  • Introduced HTTP(s) Uri support!
  • Image is cropped in a background thread.
  • Showing loader while Bitmap is processed (both loading and cropping).
  • Several bug fixes.
  • Couple new things to configure.
  • Updated minSdkVersion to Android ICS 4.0 (no reason to support couple percents of old phones).

Version: 1.3

  • Image is loaded in a background thread. Better error-handling for image decoding.

  • Improved EXIF data support (rotation and mirror).

  • Small UI updates.

  • Couple new things to configure.

  • Sample updated with the possibility to choose custom aspect ratio.

Version: 1.2

  • Updated core logic so an image corrects its position smoothly and obviously.

Version: 1.1

  • UCrop builder was updated and now UCrop.Options class has even more values to setup.

Version: 1.0

  • Initial Build

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the library.

Apps using uCrop

License

Copyright 2017, Yalantis

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.

ucrop's People

Contributors

antiufieievmichael avatar bechau avatar beigirad avatar cool04ek avatar dmytro1morozov avatar edbaev avatar hearsilent avatar isamborskiy avatar koji-1009 avatar kucherenkoihor avatar larin92 avatar legementarion avatar lithiumsheep avatar luisvasquez avatar lynnik avatar oleksandnekrasov avatar p1nkydev avatar penzk avatar peterhav avatar rwliang avatar severianremi avatar shliama avatar simonpercic avatar start141 avatar teerawk avatar timkoers avatar ukevgen avatar vanniktech avatar voltazor avatar warko-san avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ucrop's Issues

uCrop Options doesn't works

Hi,
I'm using uCrop 1.3.1, with this code:

                UCrop.Options options = new UCrop.Options();
                options.setCompressionFormat(Bitmap.CompressFormat.PNG);
                options.setCompressionQuality(60);
                options.setCropGridColumnCount(2);
                options.setCropGridRowCount(5);
                options.setToolbarColor(ContextCompat.getColor(this, R.color.colorPrimary));
                options.setStatusBarColor(ContextCompat.getColor(this, R.color.colorPrimary));
                options.setActiveWidgetColor(ContextCompat.getColor(this, R.color.green));
                options.setToolbarTitleTextColor(ContextCompat.getColor(this, R.color.white));

                UCrop uCrop = UCrop.of(sourceUri, mCroppedUri)
                        .withAspectRatio(1, 1);
                uCrop = uCrop.withOptions(options);
                uCrop.start(this);

where the colorPrimary color is #ff0000.

When the uCrop activity was launched, I always have the orange color. Where is the problem?

Crop twice

Problem: My Imageview and Pick&CropButton are in the same activity. With this library, first time I pick and crop , then set the uri to imageview, It works well. Then i pick another photo and crop. No Crash.
But the imageview still display the former one.

How to repeat:In your sample project. 1.add an imageview in activity_sample, 2. In SampleActivity's mehtod "handleCropResult()", row 291, use mImage.setImageURI(resultUri);
// ResultActivity.startWithUri(SampleActivity.this, resultUri);

pick and crop photos. You will find out.

How to fix this?

Options are not applied

I am starting UCrop from my fragment, but its not applying options. It was working before (February 9 Ucrop version 1.2.+)
Now with version 1.2.3 options are not making any difference. I just see default crop activity.

UCrop.Options options = new UCrop.Options();
        options.setShowCropFrame(false);
        options.setOvalDimmedLayer(true);
        options.setToolbarColor(ContextCompat.getColor(App.getContext(), R.color.black));

        UCrop.of(Uri.fromFile(file), Uri.fromFile(new File(getCacheImagePath())))
                .withAspectRatio(1, 1)
                .withMaxResultSize(1024, 1024)
                .withOptions(options)
                .start(getActivity(), this);

crash with "com.android.support:appcompat-v7:23.2.0"

error stack

03-09 09:24:42.490 16355-16355/? E/VdcInflateDelegate: Exception while inflating <vector>
                                                       org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportWidth > 0
                                                           at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:535)
                                                           at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:472)
                                                           at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:436)
                                                           at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:829)
                                                           at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:303)
                                                           at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:178)
                                                           at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
                                                           at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
                                                           at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254)
                                                           at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196)
                                                           at java.lang.reflect.Constructor.constructNative(Native Method)
                                                           at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                                                           at android.view.LayoutInflater.createView(LayoutInflater.java:597)
                                                           at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
                                                           at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
                                                           at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
                                                           at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
                                                           at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
                                                           at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91)
                                                           at android.app.Activity.performCreate(Activity.java:5249)
                                                           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
                                                           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
                                                           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
                                                           at android.app.ActivityThread.access$900(ActivityThread.java:141)
                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
                                                           at android.os.Looper.loop(Looper.java:136)
                                                           at android.app.ActivityThread.main(ActivityThread.java:5072)
                                                           at java.lang.reflect.Method.invokeNative(Native Method)
                                                           at java.lang.reflect.Method.invoke(Method.java:515)
                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
                                                           at dalvik.system.NativeStart.main(Native Method)
03-09 09:24:42.530 16355-16355/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: io.zouyin.app, PID: 16355
                                                   java.lang.RuntimeException: Unable to start activity ComponentInfo{io.zouyin.app/com.yalantis.ucrop.UCropActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class android.support.v7.widget.Toolbar
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:141)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:136)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5072)
                                                       at java.lang.reflect.Method.invokeNative(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:515)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
                                                       at dalvik.system.NativeStart.main(Native Method)
                                                    Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class android.support.v7.widget.Toolbar
                                                       at android.view.LayoutInflater.createView(LayoutInflater.java:623)
                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
                                                       at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
                                                       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91)
                                                       at android.app.Activity.performCreate(Activity.java:5249)
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250) 
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:141) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:136) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:5072) 
                                                       at java.lang.reflect.Method.invokeNative(Native Method) 
                                                       at java.lang.reflect.Method.invoke(Method.java:515) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
                                                       at dalvik.system.NativeStart.main(Native Method) 
                                                    Caused by: java.lang.reflect.InvocationTargetException
                                                       at java.lang.reflect.Constructor.constructNative(Native Method)
                                                       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
                                                       at android.view.LayoutInflater.createView(LayoutInflater.java:597)
                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699) 
                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:495) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:400) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                                                       at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91) 
                                                       at android.app.Activity.performCreate(Activity.java:5249) 
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165) 
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250) 
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:141) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:136) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:5072) 
                                                       at java.lang.reflect.Method.invokeNative(Native Method) 
                                                       at java.lang.reflect.Method.invoke(Method.java:515) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
                                                       at dalvik.system.NativeStart.main(Native Method) 
                                                    Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v19/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016
                                                       at android.content.res.Resources.loadDrawable(Resources.java:2149)
                                                       at android.content.res.Resources.loadDrawable(Resources.java:2072)
                                                       at android.content.res.Resources.getDrawable(Resources.java:710)
                                                       at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48)
                                                       at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374)
                                                       at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44)
                                                       at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323)
                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180)
                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
                                                       at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
                                                       at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254)
                                                       at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196)
                                                       at java.lang.reflect.Constructor.constructNative(Native Method) 
                                                       at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
                                                       at android.view.LayoutInflater.createView(LayoutInflater.java:597) 
                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699) 
                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:495) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:400) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                                                       at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91) 
                                                       at android.app.Activity.performCreate(Activity.java:5249) 
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165) 
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250) 
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:141) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:136) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:5072) 
                                                       at java.lang.reflect.Method.invokeNative(Native Method) 
                                                       at java.lang.reflect.Method.invoke(Method.java:515) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
                                                       at dalvik.system.NativeStart.main(Native Method) 
                                                    Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
                                                       at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:935)
                                                       at android.graphics.drawable.Drawable.createFromXml(Drawable.java:879)
                                                       at android.content.res.Resources.createFromXml(Resources.java:2525)
                                                       at android.content.res.Resources.loadDrawable(Resources.java:2145)
                                                       at android.content.res.Resources.loadDrawable(Resources.java:2072) 
                                                       at android.content.res.Resources.getDrawable(Resources.java:710) 
                                                       at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48) 
                                                       at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374) 
                                                       at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44) 
                                                       at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323) 
                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180) 
                                                       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173) 
                                                       at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60) 
                                                       at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254) 
                                                       at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196) 
                                                       at java.lang.reflect.Constructor.constructNative(Native Method) 
                                                       at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
                                                       at android.view.LayoutInflater.createView(LayoutInflater.java:597) 
                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699) 
                                                       at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:495) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:400) 
                                                       at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                                                       at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
                                                       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
                                                       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91) 
                                                       at android.app.Activity.performCreate(Activity.java:5249) 
                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165) 
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250) 
                                                       at android.app.ActivityThread.access$900(ActivityThread.java:141) 
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213) 
                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                       at android.os.Looper.loop(Looper.java:136) 
                                                       at android.app.ActivityThread.main(ActivityThread.java:5072) 
                                                       at java.lang.reflect.Method.invokeNative(Native Method) 
                                                       at java.lang.reflect.Method.invoke(Method.java:515) 
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
                                                       at dalvik.system.NativeStart.main(Native Method) 

Using

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'

cause this crash.

And if I using

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'

It runs well.

UCropActivity.setupViews() NullPointerException

I'm using uCrop like
UCrop.of(imageUri, destination)
.withAspectRatio(16, 9)
.withMaxResultSize(640, 360)
.start(this);

But, in UCropActivity.setupViews() which is optional UI function, I get nullPointerException at the
Bundle optionsBundle = getIntent().getBundleExtra(UCrop.EXTRA_OPTIONS)
because optionsBundle is Null.
I think that if I don't use UCrop.withOption() function, it should use default colors or something like that.
Am I use uCrop right? or should I use UCrop.withOption() function?

Question: is it possible to avoid bouncing ?

if I move the rectangle outside of the bitmap, it sends me back to where I was.

Is it possible to avoid this, and instead have one of these behaviors:

  1. just stay there, and crop what's shown.
  2. send me to the nearest place that's ok.

The reason is that it's very hard, for example, to crop the image including the edges.
Same goes for when the image is rotated.

For better User Experience.

Sorry for my poor English!

Defect:

  1. In the crop activity, selected the rotate button(middle of bottom bar), the image can't scale,
    if I want to resize the image I must to select the scale button(left of bottom bar) first, operation is not convenient.
  2. In the crop activity, selected the ratio button(right of bottom bar), when I resizing the image size, the rotate will change, it is reallyuncomfortable.

My solution:

  1. When selected the rotate button(middle of bottom bar), we should make it scalable.
  2. When selected the ratio button(right of bottom bar), we should make it keep ratio.

If you agree, I will pull a request soon.

Thanks!

No dialog or confirmation that the cropping has started

When cropping an image with D/TransformImageView: Image size: [4160:3120] the cropping takes a while. This is not the first priority, but I think you should include a dialog that says something like

Processing image...

That would prevent multiple clicks on the crop button and a inpatient user.

Thanks in advance,

Tim

Could not resolve com.yalantis:ucrop:1.3.+.

When i want to launch my app from IDE (Android Studio) it shoews Build Error

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve com.yalantis:ucrop:1.3.+.
Required by:
ErbGroup:app:unspecified
> Failed to list versions for com.yalantis:ucrop.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/yalantis/ucrop/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/yalantis/ucrop/maven-metadata.xml'.
> Connection to https://jcenter.bintray.com refused

whats problem ?
it worked yesterday, so today, i can not launch it (no library added or removed or changed) !!!

App Crash using yalantis uCrop Library On UCropActivity.setupViews() NullPointerException

After Import Yalantis uCrop to Project, when i want to Crop Image And Call Library Methods LogCat shows NullPointerException Crop Method Attached :

crop.txt

in Logcat

Do Crop -> PICK FROM FILE : /storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/.HK13670922/IMG_20160306_163157.jpg

And

get Uri From Path -> Uri : /storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/.HK13670922 file:///storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/storage/emulated/0/Android/data/com.emaarit.app.erbgroup/.files/.HK13670922

it means 'mImageCaptureUri' And getUriFromPath() Is Not Null

How To Fix It ?

image-dimensions after cropping

Hi there!

Is there an easy way of getting the cropping-dimensions after the crop has been done by the user? Since I don't know if the user chooses '4:3', '16:9', etc. I currently have to decode the size of the saved image manually.

Would probably be nice if it was passed after the cropping

Change colors of UI controls

Hi, I'm not see methods for setup colors for UI elements such as toolbar, bittons for scale and rotate or icons for close and next.
Does this functionlaity would be implemented or not ?

Custom OverlayView radius without change image padding

What I want to show in my app:

ucrop-issue-pic01

I attempt to change padding of OverlayView but I must also change GestureCropImageView's padding because, as your describe, 'padding for both views must be equal'.

vGestureCropImageView.setPadding(padding, padding, padding, padding);
vOverlayView.setPadding(padding, padding, padding, padding);

The real display:

ucrop-issue-pic02

Option to edit picture in picture editing apps

It would be nice to have an option to let the user still nonetheless choose another application to edit the picture further (e.g. Google Photos).

This can be archived using

Intent editIntent = new Intent(Intent.ACTION_EDIT);
editIntent.setDataAndType(uri, "image/*");
editIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(editIntent, null));

Is there any interest in adding this to the core library?

issue about toolbar

a new issue comes up when update to 1.3.1 version

 Caused by: java.lang.IllegalStateException: 
This Activity already has an action bar supplied by the window decor. 
Do not request Window.FEATURE_SUPPORT_ACTION_BAR 
and set windowActionBar to false in your theme to use a Toolbar instead.
at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:195)
                                                                       at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:119)
                                                                       at com.yalantis.ucrop.UCropActivity.setupAppBar(UCropActivity.java:268)
                                                                       at com.yalantis.ucrop.UCropActivity.setupViews(UCropActivity.java:239)
                                                                       at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:101)
                                                                       at android.app.Activity.performCreate(Activity.java:6251)

it seems here:

private void setupAppBar() {
        setStatusBarColor(mStatusBarColor);

        final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

        // Set all of the Toolbar coloring
        toolbar.setBackgroundColor(mToolbarColor);
        toolbar.setTitleTextColor(mToolbarTextColor);

        final TextView toolbarTitle = (TextView) toolbar.findViewById(R.id.toolbar_title);
        toolbarTitle.setTextColor(mToolbarTextColor);
        toolbarTitle.setText(mToolbarTitle);

        // Color buttons inside the Toolbar
        Drawable stateButtonDrawable = ContextCompat.getDrawable(this, R.drawable.ucrop_ic_cross).mutate();
        stateButtonDrawable.setColorFilter(mToolbarTextColor, PorterDuff.Mode.SRC_ATOP);
        toolbar.setNavigationIcon(stateButtonDrawable);

        setSupportActionBar(toolbar);// here
        final ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setDisplayShowTitleEnabled(false);
        }
    }

How to mask OvalDimmedLayer antialias?

When using canvas.clipPath to draw oval dimmed layer, the oval should not antialias.

Like this img
qq20160204-0 2x

If change to use Xfermode with the paint, it should be like this
qq20160204-1 2x

The code line would

    private static final int PAINT_FLAGS = Paint.DITHER_FLAG | Paint.FILTER_BITMAP_FLAG |
            Paint.ANTI_ALIAS_FLAG;
    private static final Paint MASK_BITMAP_PAINT;

    static {
        MASK_BITMAP_PAINT = new Paint(PAINT_FLAGS);
        MASK_BITMAP_PAINT.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
    }

    ...

    Bitmap result = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);

    Canvas ovalDimmedCanvas = new Canvas(result);
    ovalDimmedCanvas.drawColor(mDimmedColor);
    ovalDimmedCanvas.drawOval(mCropViewRect, MASK_BITMAP_PAINT);

    canvas.drawBitmap(result, 0, 0, new Paint(PAINT_FLAGS));

But, create bitmap drawing may a way which not good enough.

So, anybody know how to use Xfermode without create bitmap?

Thanks!

Toolbar color

There's no way to change the toolbar color. I've been going around your code but can't seem to find an easy way. (Setting a theme to the activity doesn't work)

Thanks

Scale down limit with setOvalDimmedLayer(true)

uCrop is very nice. This might well be not a bug, but a feature request.

I am using an oval dimmed layer, cause I actually only need the oval part of the created final image. I can filter out the oval data from the image create by uCrop which of course delivers a square.

However I realize, that scaling down is limited by the restriction, that the whole displayed square grid needs to be filled with some image data. Since I do not care for the space between the oval and the square, I'd like to be able to scale images somewhat smaller, i.e. no image data in some of the corners, as long as there is image data everywhere in that oval ...

prevent scaling poor quality images

Can you tell me how to stop scaling imageview by touching. I want to call img.setScaleEnabled(false);
when the scaled image pixels count will be less than device screen pixelCount / 4.

"Freestyle" cropping

Can we have a feature to crop a picture freely by dragging the picture corners instead of having to pinch to zoom in/out or changing the aspect ratio?

Thanks!

Circle preview

Can I make crop preview area as circle.
Actual crop will be square, but I want users see their avatars in circle, so they can see how it will look in our app.

Appcompat lib no necessary

Thanks for a nice library!

uCrop extend AppCompatActivity, I think it is no necessary.
Can you use custom layout instead ActionBar and remove the appcompat lib? It will let the library smaller.
If you agree, I will pull a request.

Thanks again!

Square options: bouncing and center crop

Hi,
thanks for your awesome library.
I would to have some info about square aspect ratio. You can find a demo video here: https://youtu.be/XPj1yEXzl2U

As you can see, I have problem to crop at the top and the bottom of the selected image. I can crop correctly only if I add a zoom operation on the image.

Where am I wrong?

Support Circular Frame

nowdays. many UI using the circle profile images...

just there are guide frame, output must not be circle image.

really thanks for sharing awesome library.

android.view.InflateException

Hello guys, I am trying to integrate you cropping tool which looks pretty amazing into our app.
Unfortunately iam experiencing " android.view.InflateException" after i call :

UCrop.of(uri, mDestinationUri)
      .withAspectRatio(1, 1)
      .withMaxResultSize(Constants.CROP_IMAGE_MAX_SIZE, Constants.CROP_IMAGE_MAX_SIZE)
      .start(this);

with :

uri : content://com.android.providers.media.documents/document/image%3A31397
mDestinationUri : file:///data/data/com.our.package.name.debug/cache/SampleCropImage.jpeg 

error looks like this :

Process: com.our.package.name.debug, PID: 757
                                                java.lang.RuntimeException: Unable to start activity ComponentInfo{com.our.package.name.debug/com.yalantis.ucrop.UCropActivity}: android.view.InflateException: Binary XML file line #40: Error inflating class <unknown>
                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
                                                    at android.app.ActivityThread.access$800(ActivityThread.java:151)
                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
                                                    at android.os.Handler.dispatchMessage(Handler.java:102)
                                                    at android.os.Looper.loop(Looper.java:135)
                                                    at android.app.ActivityThread.main(ActivityThread.java:5254)
                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                    at java.lang.reflect.Method.invoke(Method.java:372)
                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
                                                 Caused by: android.view.InflateException: Binary XML file line #40: Error inflating class <unknown>
                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:633)
                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
                                                    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916)
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
                                                    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
                                                    at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91)
                                                    at android.app.Activity.performCreate(Activity.java:5990)
                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
                                                    at android.app.ActivityThread.access$800(ActivityThread.java:151) 
                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                    at android.os.Looper.loop(Looper.java:135) 
                                                    at android.app.ActivityThread.main(ActivityThread.java:5254) 
                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                    at java.lang.reflect.Method.invoke(Method.java:372) 
                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
                                                 Caused by: java.lang.reflect.InvocationTargetException
                                                    at java.lang.reflect.Constructor.newInstance(Native Method)
                                                    at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:607)
                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
                                                    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:802) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
                                                    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256) 
                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109) 
                                                    at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91) 
                                                    at android.app.Activity.performCreate(Activity.java:5990) 
                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 
                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) 
                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
                                                    at android.app.ActivityThread.access$800(ActivityThread.java:151) 
                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                    at android.os.Looper.loop(Looper.java:135) 
                                                    at android.app.ActivityThread.main(ActivityThread.java:5254) 
                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                    at java.lang.reflect.Method.invoke(Method.java:372) 
                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
                                                 Caused by: java.lang.ArrayIndexOutOfBoundsException: length=20; index=1882
                                                    at android.content.res.StringBlock.get(StringBlock.java:65)
                                                    at android.content.res.XmlBlock$Parser.getPooledString(XmlBlock.java:458)
                                                    at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:991)
                                                    at android.content.res.TypedArray.getString(TypedArray.java:176)
                                                    at android.widget.TextView.<init>(TextView.java:1015)
                                                    at android.widget.TextView.<init>(TextView.java:632)
                                                    at com.yalantis.ucrop.view.widget.AspectRatioTextView.<init>(AspectRatioTextView.java:44)
                                                    at com.yalantis.ucrop.view.widget.AspectRatioTextView.<init>(AspectRatioTextView.java:40)
                                                    at java.lang.reflect.Constructor.newInstance(Native Method) 
                                                    at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
                                                    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
                                                    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:802) 
                                                    at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
                                                    at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
                                                    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256) 
                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109) 
                                                    at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:91) 
                                                    at android.app.Activity.performCreate(Activity.java:5990) 
                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 
                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) 
                                                    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 
                                                    at android.app.ActivityThread.access$800(ActivityThread.java:151) 
                                                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
                                                    at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                    at android.os.Looper.loop(Looper.java:135) 
                                                    at android.app.ActivityThread.main(ActivityThread.java:5254) 
                                                    at java.lang.reflect.Method.invoke(Native Method) 
                                                    at java.lang.reflect.Method.invoke(Method.java:372) 
                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 

Canvas: trying to use a recycled bitmap

I am just run the simple,and get the exception,log as follow:

01-28 14:24:59.110 31033-31033/com.yalantis.ucrop.sample E/SampleActivity: handleCropError:
java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@420cfd18
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1093)
at android.graphics.Canvas.drawBitmap(Canvas.java:1179)
at android.graphics.Bitmap.createBitmap(Bitmap.java:761)
at android.graphics.Bitmap.createBitmap(Bitmap.java:646)
at com.yalantis.ucrop.view.CropImageView.cropImage(CropImageView.java:134)
at com.yalantis.ucrop.UCropActivity.cropAndSaveImage(UCropActivity.java:381)
at com.yalantis.ucrop.UCropActivity.onOptionsItemSelected(UCropActivity.java:81)

to support camera

Nowdays many apps require pic captured from camera ,will you add this function?

Error After Crop 'Is a directory'

I tried to crop photo and fix some errors

at onActivityResult Log Errors

if(resultCode == UCrop.RESULT_ERROR){
Throwable cropError = UCrop.getError(data);
LTH.eLog(PHOTO_TAG, PurchaseAsync.TAG + " -> UCrop RESULT ERROR");
LTH.eLog(PHOTO_TAG, PurchaseAsync.TAG + " -> Error In Crop : " + cropError.getMessage(), cropError);
}

Message : Is a directory

java.io.FileNotFoundException: Is a directory
        at android.os.Parcel.openFileDescriptor(Native Method)
        at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:252)
        at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:198)
        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:899)
        at android.content.ContentResolver.openOutputStream(ContentResolver.java:669)
        at android.content.ContentResolver.openOutputStream(ContentResolver.java:645)
        at com.yalantis.ucrop.UCropActivity.cropAndSaveImage(UCropActivity.java:534)
        at com.yalantis.ucrop.UCropActivity.onOptionsItemSelected(UCropActivity.java:124)
        at android.app.Activity.onMenuItemSelected(Activity.java:2600)
        at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:404)
        at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:167)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
        at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
        at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:69)
        at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:169)
        at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:760)
        at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:811)
        at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
        at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:958)
        at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:948)
        at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:618)
        at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:139)
        at android.view.View.performClick(View.java:4438)
        at android.view.View$PerformClick.run(View.java:18422)
        at android.os.Handler.handleCallback(Handler.java:733)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)

rounded crop option

FEATURE REQUEST : i thinks it will be useful ,adding rounded crop option with rounded overlay

cropview screen is black

Sometimes when i choose an image , crop image viewer didnt shows anything (just a black screen) , after sometimes it workes
device-2016-03-06-194855

Crash after photo selection

When I select the photo and try to load the cropActivity, I got an error. Don't know what to do!

Call
In fragment

public void CropImage(Uri selectedImage) {
    UCrop.Options options = new UCrop.Options();
    options.setToolbarColor(ContextCompat.getColor(getContext(), R.color.ocean_blue));
    options.setCompressionFormat(Bitmap.CompressFormat.PNG);
    UCrop.of(selectedImage, Uri.fromFile(new File(getContext().getFilesDir(), "image.png")))
      .withAspectRatio(1, 1)
      .withMaxResultSize(800, 800)
      .withOptions(options)
      .start(getContext(), this );
  }

selectedImage URI = content://com.android.providers.media.documents/document/image%3A190
newFile URI = file:///data/data/app.speaky.com/files/image.png

Error stack

 03-16 14:12:10.864 16502-16502/? E/AndroidRuntime: FATAL EXCEPTION: main
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime: Process: app.speaky.com, PID: 16502
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{app.speaky.com/com.yalantis.ucrop.UCropActivity}: android.view.InflateException: Binary XML file line #40: Error inflating class <unknown>
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2695)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.access$900(ActivityThread.java:177)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5910)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:  Caused by: android.view.InflateException: Binary XML file line #40: Error inflating class <unknown>
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:633)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:802)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:97)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6178)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.access$900(ActivityThread.java:177) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5910) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:  Caused by: java.lang.reflect.InvocationTargetException
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Native Method)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:607)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:802) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:97) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6178) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.access$900(ActivityThread.java:177) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5910) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:  Caused by: java.lang.ArrayIndexOutOfBoundsException: length=20; index=1872
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.content.res.StringBlock.get(StringBlock.java:65)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.content.res.XmlBlock$Parser.getPooledString(XmlBlock.java:482)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:1003)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.content.res.TypedArray.getString(TypedArray.java:177)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.widget.TextView.<init>(TextView.java:1087)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.widget.TextView.<init>(TextView.java:685)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.yalantis.ucrop.view.widget.AspectRatioTextView.<init>(AspectRatioTextView.java:44)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.yalantis.ucrop.view.widget.AspectRatioTextView.<init>(AspectRatioTextView.java:40)
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Native Method) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:916) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:802) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.yalantis.ucrop.UCropActivity.onCreate(UCropActivity.java:97) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:6178) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2648) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.access$900(ActivityThread.java:177) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1430) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5910) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
03-16 14:12:10.864 16502-16502/? E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 

Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId 'app.speaky.com'
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName '1.0'
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.0'
    compile 'com.android.support:support-v4:23.2.0'
    compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1'
    compile 'com.joanzapata.iconify:android-iconify-material:2.1.1'
    compile 'com.android.support:design:23.2.0'
    compile 'com.android.support:recyclerview-v7:23.2.0'
    compile 'com.android.support:cardview-v7:23.2.0'
    compile 'com.makeramen:roundedimageview:2.2.1'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
    compile 'com.squareup.okhttp:okhttp:2.7.0'
    compile 'com.facebook.android:facebook-android-sdk:4.9.0'
    compile 'com.google.android.gms:play-services-auth:8.4.0'
    compile 'org.jetbrains:annotations:13.0'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.google.guava:guava:19.0'
    compile('io.socket:socket.io-client:0.7.0') {
        exclude group: 'org.json', module: 'json'
    }
    compile 'org.apmem.tools:layouts:1.10'
    compile 'com.yalantis:ucrop:1.3.2'
    compile 'org.webjars:google-diff-match-patch:20121119-1'
    compile 'joda-time:joda-time:2.9.2'
    compile 'com.github.rahatarmanahmed:circularprogressview:2.4.0'
}

apply plugin: 'com.google.gms.google-services'

16K image becomes lower than 1K

I used the Sample from GPlay. When I tried to crop 3558x4656 image I got 520x660 in the output. Aspect Ratio =Original, 100% "zoom" and 100% quality.
How can I solve it.

Ouput crop quality issue

Hi,

I tried to crop a large image (around 20 mega pixels). So for the preview, As I see on your code, you downscale the quality of the image base on the screen size to make the app smoother.

But after I crop the image, the quality is really poor even if I put quality 100 percent.
So my question is, do you crop the original image or you crop the low quality preview image ?

I guess if the user have a cheap phone, the quality output will be very low.

Http/Https as uri source not supported

By code I can see what only file uri supported as source for launch library.
If try to set uri as link to image - get exeption java.io.FileNotFoundException: No content provider

It's because BitmapLoadUtils.decode use only one provider, which try to open existing file on read:
context.getContentResolver().openFileDescriptor(uri, "r")

So, I think need include functionality for support another uri types.

Change theme color

It's possible to change the color orange #FF6E40 (ucrop_color_toolbar and ucrop_color_widget_active) with the colorPrimary in your theme?
And allow to do that to adapt the style to the application :

<activity
    android:name="com.yalantis.ucrop.UCropActivity"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme"/>

Preload low quality, then load full image

Can we preload low quality image(thumbnail) first, and then when full image available replace it with full image. Such behaviour has IOS crop library RSKImageCropper.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.