Comments (5)
@TarasBounty , Please check my answer, It will help you as i faced it and solve
from flutter-custom-image-crop.
@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.
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.
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.
Also face the same issue
@ikbendewilliam @vanlooverenkoen please take a look
from flutter-custom-image-crop.
Related Issues (20)
- how to do aspect ratio in this package? HOT 3
- Initial scaling HOT 2
- onCropImage return bytes with black image on web HOT 3
- CustomCropShape - Ratio HOT 1
- [Feature Request] CustomPaint for drawPath
- [Feature request] Rounded corners for Square and Custom ratio
- Update SolidCropPathPainter make paint style config able like DottedCropPathPainter
- [Feature request] create tool to generate Custom paths. HOT 3
- Photo behavior in the cropping area HOT 10
- why crop result always is square HOT 8
- onCropImage is not working as expected in web HOT 11
- [Bug] Crop Image by ratio not resizing image to width and height HOT 5
- apply crop on the initial image given by the input path HOT 1
- Have background white after crop to circle HOT 1
- Landscape crop area shape and portrait images - initial fit by height
- Too slow cropping and result is too big HOT 4
- SVG image pick and crop HOT 1
- Overlay color affects the Image HOT 1
- The app βRunnerβ has been killed by the operating system because it is using too much memory. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-custom-image-crop.