CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
https://canhub.github.io/
Apache License 2.0
1.17k stars 240 forks source link

Prevent CropRect Translation in Image Cropper #620

Open mans17312 opened 3 months ago

mans17312 commented 3 months ago

Description: Currently, the image cropper allows the CropRect to translate, which can result in unintended changes to the selected area. However, in some cases, users may require a fixed aspect ratio without allowing the CropRect to translate.

Problem:

  1. The CropRect can translate freely, causing the selected area to change size or position unintentionally.
  2. While setFixedAspectRatio exists, it does not prevent the CropRect from translating.

Desired Solution:

  1. Disable the translation of the CropRect while maintaining a fixed aspect ratio.
  2. Even if the user attempts to translate the CropRect, it should remain fixed in size and aspect ratio.
  3. Provide a way to enable/disable this feature programmatically or through configuration options.