Coder Social home page Coder Social logo

Small image can't scale about cropiwa HOT 10 CLOSED

steelkiwi avatar steelkiwi commented on May 20, 2024
Small image can't scale

from cropiwa.

Comments (10)

vellrya avatar vellrya commented on May 20, 2024

I confirm.
Video: http://dropmefiles.com/UEQjI
Scale and translation gesture are activated.

from cropiwa.

polyak01 avatar polyak01 commented on May 20, 2024
app:ci_max_scale="1f"

cropView.configureImage()
  .setMinScale(minScale)
  .setMaxScale(maxScale)
  .apply();

Try to decrease minScale / increase maxScale

from cropiwa.

AnswerZhao avatar AnswerZhao commented on May 20, 2024

@polyak01 It can't works.

from cropiwa.

polyak01 avatar polyak01 commented on May 20, 2024

@AnswerZhao do you try to setMinScale(0.1f)?

from cropiwa.

AnswerZhao avatar AnswerZhao commented on May 20, 2024

@polyak01
float scaleFactor = detector.getScaleFactor(); float newScale = matrixUtils.getScaleX(imageMatrix) * scaleFactor;
When the photo is too small, the newScale value is too lager than the maxScale.(70*70Px, the newScale is 25), so i think the scale value is not perfect. I change the method isValidScal() to resolve it finally.

from cropiwa.

vellrya avatar vellrya commented on May 20, 2024

@polyak01
I set MaxScale to 9f (minimum value at which it start working with my (409*103) picture) and MinScale to 0f.
It works, but it works strange. Until I set the frame with the same aspect ratio as the picture itself, I can not reduce the image. In addition, scale gestures work only outside the crop area.
(Video: http://dropmefiles.com/DbG2d)

from cropiwa.

AnswerZhao avatar AnswerZhao commented on May 20, 2024

@vellrya 9 is not work for everything, you can try a 43*43 picture.

from cropiwa.

vellrya avatar vellrya commented on May 20, 2024

Okay. I decided for myself this problem. I completely removed Min and Maxscale and did this:

cropView.configureOverlay()
                .setAspectRatio(AspectRatio.IMG_SRC)
                .apply()

Now I can correctly move and scale small pictures. (http://dropmefiles.com/KQByj)
It remains only to wait for the ability to rotate pictures in this library)

from cropiwa.

polyak01 avatar polyak01 commented on May 20, 2024

@AnswerZhao Did you solved the problem?

from cropiwa.

AnswerZhao avatar AnswerZhao commented on May 20, 2024

@polyak01 Yep. You can change the implement of the method isValidScal() ,or increase the maxScale, or remove the limits of maxScale.

from cropiwa.

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.