Git Product home page Git Product logo

Comments (2)

jeduan avatar jeduan commented on July 1, 2024

Not right now. Here's the relevant lines in case you want to modify it or take a stab at a PR (which I would appreciate)

https://github.com/jeduan/cordova-plugin-crop/blob/master/src/ios/CTCrop.m#L47
https://github.com/jeduan/cordova-plugin-crop/blob/master/src/android/CropPlugin.java#L39

from cordova-plugin-crop.

matte5031 avatar matte5031 commented on July 1, 2024

@kosurusekhar Looking for something similar, did you manage to do this? thanks
@jeduan I found a fork with a modified crop class at jdamcd/android-crop#224
This one has this code which can be used to set a minimum size:

public Crop withMinSize(int width, int height) { cropIntent.putExtra(Extra.MIN_X, width); cropIntent.putExtra(Extra.MIN_Y, height); return this; }

Crop.of(source, destination).withMinSize(512, 512).asSquare().start(this)

or in this plugin something like:

Crop.of(this.inputUri, this.outputUri).withMinSize(512, 512).asSquare().start(cordova.getActivity());

But my programming knowledge is at beginners level and i've never used java therefore i've got no idea how to override the imported Crop Class with this modified Crop class that makes setting a minimum size possible. I've tried to remove the line
import com.soundcloud.android.crop.Crop; and added a new Cop.java file with the modified Crop class and put it inside inside the "cropimagePlugin\cordova-plugin-crop-master\src\android" folder. However anything with removing the imported Crop class seems to create a build error.
If you know how this can be done in this plugin i'd appreciate your help, thanks!

from cordova-plugin-crop.

Related Issues (20)

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.