Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cropping options #131

Closed
canberkcakmak opened this issue Jun 16, 2016 · 18 comments
Closed

Cropping options #131

canberkcakmak opened this issue Jun 16, 2016 · 18 comments

Comments

@canberkcakmak
Copy link

canberkcakmak commented Jun 16, 2016

How can i disable only original cropping with options. using?

@canberkcakmak canberkcakmak changed the title Using normal onActivityResult in fragment Whrong place Jun 16, 2016
@canberkcakmak canberkcakmak reopened this Jun 18, 2016
@canberkcakmak canberkcakmak changed the title Whrong place Cropping options Jun 18, 2016
@shliama
Copy link
Contributor

shliama commented Jun 22, 2016

Currently you cannot do this. However I'm planning to add a feature so you can set your own selection of aspect ratio buttons in future update.

@shliama shliama self-assigned this Jun 22, 2016
@canberkcakmak
Copy link
Author

This is great. Thanks for answering. This is important because i have a project about photography and i think some users want to upload width :30px height:5000px photos for crashing to my app :). Have a nice day

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

@canberkcakmak please use library version 2.1.0 and Ucrop.Options.setAspectRatioOptions method :octocat:

@canberkcakmak
Copy link
Author

Woow :) you re really perfect. I will try today. Thanks man :)

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

@canberkcakmak
Copy link
Author

Hi, i'm ,implement new version but, in the library build.gradle file compile 'com.android.support:appcompat-v7:24.0.0'
gives error for my application. i'm using 23.2.1. When open the app in device it crashed and not give any log. Then i'm change my 23.2.1 to 24.0.0. but it gives same error. How can i solve this ? any suggestion. Thanks so much

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

@canberkcakmak I have a project with 23.4.0 version of appcompat & it runs well. I don't think that there are no error logs at all, maybe you have to change your logs level visibility etc.
And of course, use clean.

Otherwise you can try to do this:

compile('com.android.support:appcompat-v7:23.2.1') {
    // force to use 23.2.1 even if another library resolves higher version
    force = true 
}

@canberkcakmak
Copy link
Author

Ok. I download your library and implement manually my project and chage build.gradle with 23.2.1 it's perfectly worked. Thank you so much for update. :) have a nice day

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

(ノ◕ヮ◕)ノ*:・゚✧

@shliama shliama closed this as completed Jun 27, 2016
@canberkcakmak
Copy link
Author

sorry for open again :) and sorry for puzzling you. But my crop problem not solved i see. When i select my silly height photo firstly it shows original cropping. But when i clicked options it turns normal. here is my screenshot:
http://i.hizliresim.com/l14lmp.png

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

Can you post here your uCrop config?

@canberkcakmak
Copy link
Author

UCrop.Options options = new UCrop.Options();
options.setCompressionFormat(Bitmap.CompressFormat.JPEG);
options.setCompressionQuality(100);
options.setToolbarColor(context.getResources().getColor(R.color.white));

    options.setToolbarWidgetColor(context.getResources().getColor(R.color.black));
    options.setStatusBarColor(context.getResources().getColor(R.color.colorPrimaryDark));

    options.setAspectRatioOptions(1,
            new AspectRatio("1:2", 1, 2),
            new AspectRatio("3:4", 3, 4),
            new AspectRatio("5:3", 5, 3),
            new AspectRatio("16:9", 16, 9),
            new AspectRatio("1:1", 1, 1));


    UCrop.of(srcUri, destUri)
            .withOptions(options)
            .start(context);

here

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

Yei, you've found a bug :) Gonna push hotfix later today

@canberkcakmak
Copy link
Author

:) okey. Again thanks for perfect crop library. I've tried almost all libraries and i think this is the best.

@shliama
Copy link
Contributor

shliama commented Jun 27, 2016

I've pushed an update 2.1.1 - above issue should be fixed :)

And by the way, if use api like this, library automatically makes same title from given numbers & swaps them if user clicks on it again.

options.setAspectRatioOptions(1,
            new AspectRatio(null, 1, 2),
            new AspectRatio(null, 3, 4),
            new AspectRatio(null, 5, 3),
            new AspectRatio(null, 16, 9),
            new AspectRatio(null, 1, 1));

@canberkcakmak
Copy link
Author

it is working perfectly :) thanks man have a nice day.

@haniha
Copy link

haniha commented Nov 26, 2016

And by the way, if use api like this, library automatically makes same title from given numbers & swaps them if user clicks on it again.

@shliama is there any option to disable swapping ?

@meetVora1994
Copy link

How to enable free cropping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants