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

Support fixing the crop size and aspect ratio on iOS #2098

Open
1 of 2 tasks
david-gettins opened this issue Oct 8, 2024 · 0 comments
Open
1 of 2 tasks

Support fixing the crop size and aspect ratio on iOS #2098

david-gettins opened this issue Oct 8, 2024 · 0 comments

Comments

@david-gettins
Copy link

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.41.2
  • react-native v0.74.3

Platform

Tell us to which platform this issue is related

  • iOS
  • Android

Expected behaviour

When cropping, if I set the width and height in the options and disable free crop, then the user should not be able to change the crop window size, only zoom and rotate the image. The aspect ratio of the crop window should not change.

Actual behaviour

The user can change the crop window size. Furthermore, the crop window aspect ratio can be changed by moving the window to the edge of the image and resizing it.

It's worth noting that on Android the crop window and aspect ratio cannot be changed and works as expected. Ideally I would, at least, like to maintain the aspect ratio of crops on multiple images.

Steps to reproduce

  1. On iOS, open the cropper with the following options:
    {
      cropping: true,
      freeStyleCropEnabled: false,
      path: image.path,
      width: 200,
      height: 100,
      avoidEmptySpaceAroundImage: true,
    }
  2. Change the crop window size to see the first issue.
  3. Move the crop window to the edge of the image.
  4. Change the size of the crop window while pushed up against the edge to see the aspect ratio issue.

Attachments

Video to illustrate the problem:

clip.mp4
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

1 participant