Coder Social home page Coder Social logo

Comments (6)

Arvkon avatar Arvkon commented on May 20, 2024 1

You, sir, are a gentleman! Your suggestion worked like a charm =)

I made a fork with your code and a minOutputSize property: Arvkon@e590f8a

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on May 20, 2024

Hello Arvid,

Sorry for the delay.
I will think about it in the coming weekend.
Currently, you can try to add the following code to this line:

if (boundsSize.width < boundsSize.height) {
    maxScale = MIN(maxScale, boundsSize.width / 640.0);
} else {
    maxScale = MIN(maxScale, boundsSize.height / 640.0);
}

Sincerely,
Ruslan

Update (29/11/2017):

Additionally, you must handle the case where the size of the original image is smaller than the minimum output size.

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on May 20, 2024

πŸ˜ƒ πŸ‘

from rskimagecropper.

perlasivakrishna avatar perlasivakrishna commented on May 20, 2024

How to set Min and Max Zoom in Swift ?

from rskimagecropper.

annjawn avatar annjawn commented on May 20, 2024

i see that this has still not made into the master. Is there plans to move it?

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on May 20, 2024

No. There aren't.

You should not limit the size of the image when cropping.

Instead of this, to get an image with the specific minimum size you need to use RSKImageCropper to crop the original image and then if needed manually scale the cropped image up to the minimum output size. This will allow the user to select any desired part of the image.

from rskimagecropper.

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.