Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Croping drastically reduce image width and height #108

Open
mde-pach opened this issue Dec 10, 2019 · 5 comments
Open

Croping drastically reduce image width and height #108

mde-pach opened this issue Dec 10, 2019 · 5 comments

Comments

@mde-pach
Copy link

When I crop my phone native captured image 4608 by 3456 pixel just a little bit (like 100 pixels up) the result is a 1062 by 864 instead of an 4500 by 3456 image.

File croppedImage = await ImageCropper.cropImage(
    sourcePath: myImage.path,
    aspectRatioPresets: [
        CropAspectRatioPreset.square,
        CropAspectRatioPreset.ratio3x2,
        CropAspectRatioPreset.original,
        CropAspectRatioPreset.ratio4x3,
        CropAspectRatioPreset.ratio16x9
    ],
    androidUiSettings: AndroidUiSettings(
        toolbarTitle: 'Cropper',
        toolbarColor: Colors.deepOrange,
        toolbarWidgetColor: Colors.white,
        initAspectRatio: CropAspectRatioPreset.original,
        lockAspectRatio: false),
    iosUiSettings: IOSUiSettings(
        minimumAspectRatio: 1.0,
    )
);
@mde-pach mde-pach changed the title Croping drastically reduce image size Croping drastically reduce image width and height Dec 10, 2019
@mde-pach
Copy link
Author

This issue occure when there is no maxBitmapSize set in uCrop.
The default maxBitmapSize will be set there

The maxBitmapSize calculate function doesn't return an optimal value for recent camera phone that take 4XXX by 4XXX pixels photos.

If I want to keep the maximum photo resolution I should be able to set the maxBitmapSize at a custom value.

@juliengit2
Copy link

any update about this issue ?

@pedrocar
Copy link

I have the exact same problem. Please, is there any update about this ?

@mde-pach
Copy link
Author

There is a pull request I just have few changes to do

@stepanov-standy
Copy link

@mde-pach could you please let me know if the issue was solved. It is a must have feature to get proper work on iOS devices. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants