Giter VIP home page Giter VIP logo

Comments (5)

RockyPanchal avatar RockyPanchal commented on June 18, 2024 1

@TarasBounty , Please check my answer, It will help you as i faced it and solve

from flutter-custom-image-crop.

TarasBounty avatar TarasBounty commented on June 18, 2024 1

@RockyPanchal Thanks, I saw it. Hope @ikbendewilliam will fix it in the next package release and we can use it without a "fork workaround"

from flutter-custom-image-crop.

ikbendewilliam avatar ikbendewilliam commented on June 18, 2024 1

Currently we are very busy with projects, if you have a fork with a fix, please create a PR so we can have this fix available for everyone :-)

from flutter-custom-image-crop.

RockyPanchal avatar RockyPanchal commented on June 18, 2024

Hello, @Z6P0
I faced the same issue earlier, I understand the core code and made changes in one of the file in library. then its works fine

Please do changes in that file and check

  • in calculate_on_crop_params.dart file
    -caclulateOnCropParams function

replace below code at the end , It will definitely works,

I made changes in cropSizeHeight, cropSizeWidth parameter according to aspect ratio

final double cropSizeWidth;
final double cropSizeHeight;
if (aspectRatio > 1) {
cropSizeWidth = cropSizeMax;
cropSizeHeight = cropSizeWidth / aspectRatio;
} else {
cropSizeHeight = cropSizeMax / aspectRatio;
cropSizeWidth = cropSizeHeight * aspectRatio;
}
return OnCropParams(
cropSizeHeight: cropSizeHeight,
cropSizeWidth: cropSizeWidth,
translateScale: translateScale,
scale: scale,
);

Thanks

from flutter-custom-image-crop.

TarasBounty avatar TarasBounty commented on June 18, 2024

Also face the same issue
@ikbendewilliam @vanlooverenkoen please take a look

from flutter-custom-image-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.