CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
Apache License 2.0
1.28k stars 262 forks source link

Can you increase the function of multi-finger zooming in pictures? #578

Open showdy opened 1 year ago

showdy commented 1 year ago

https://github.com/CanHub/Android-Image-Cropper/assets/13609650/87d48ab9-b25b-4b75-b915-f53519736fab

vanniktech commented 1 year ago

I don't get it.

showdy commented 1 year ago

I don't get it.

In the example, the multi touch function is used, but the effect seems to have some problems. Can the effect of multi-touch be optimized as shown in the video above.

vanniktech commented 1 year ago

Optimized in which way?

RahulSDeshpande commented 1 year ago

@vanniktech I guess, @showdy means, does this library support cropping using zoom in/out on the image?

Am I right @showdy? 🤔

MathiasDL commented 7 months ago

Multitouch zooming during cropping would indeed be a great addition to this library! Note that the multiTouchEnabled exists, but it is very buggy in my experience:

  1. It seems to conflict with adjusting the crop area. Once multitouch is detected, only zoom should be active
  2. fixAspectRatio is not respected when multitouch is enabled

Turning off autoZoomEnabled reduces these issues a bit, but autozoom is a great feature

I may try to fix this in the library and create a PR

vanniktech commented 7 months ago

PRs are welcome!

vanniktech commented 3 months ago

@MathiasDL have you had any time to look at this?

MathiasDL commented 3 months ago

@vanniktech I am currently converting my app to Kotlin Multiplatform (KMP), which is not compatible with this library, so I won't be implementing this...

vanniktech commented 3 months ago

What do you use for image cropping? I also have a KMP library and I use this library on the Android side and Mantis on iOS.

MathiasDL commented 3 months ago

I am considering this library: CMP-image-pick-n-crop. If it is not good enough, I will probably follow your approach. I will know in a couple of weeks when I get to that point in the conversion

MathiasDL commented 1 month ago

@vanniktech FYI, I went with https://github.com/tamimattafi/krop (KMP fork of easycrop)