guoyingtao / Mantis

An iOS Image cropping library, which mimics the Photo App written in Swift.
MIT License
926 stars 184 forks source link

Strange Crop Box behavior #242

Closed vanniktech closed 1 year ago

vanniktech commented 1 year ago

Possibly related to https://github.com/guoyingtao/Mantis/pull/194 - although this time on a real iPhone XR with iOS 16.2 using Mantis 2.2.1

There are a few glitches:

https://user-images.githubusercontent.com/5759366/210814863-af116395-502d-4330-9167-855742d11515.mp4

My set up looks like this:

config.cropViewConfig.maximumZoomScale = some value
config.cropViewConfig.cropShapeType = .rect
config.showAttachedCropToolbar = false
config.cropViewConfig.showRotationDial = false
config.cropViewConfig.cropMaskVisualEffectType = .light
config.cropToolbarConfig.toolbarButtonOptions = []
config.ratioOptions = []

Mantis.cropViewController(
    image: image,
    config: config
)
...

Note that I myself can't reproduce this in the Simulator and at the moment I don't have a device that I can use. That video is from my colleague.

guoyingtao commented 1 year ago

@vanniktech Thanks for the feedback! I also noticed the similar issue. It is a little bit tricky to fix it. I was kind of busy recently but I will begin to fix this issue once I get more time this week.

guoyingtao commented 1 year ago

@vanniktech I improved this issue in #243 Can you help to check if it works for you? Thanks!

guoyingtao commented 1 year ago

I released Mantis 2.4.0 for this issue. Hope it also solve the issue of the crop box leaves the image boundaries completely. (I did not reproduce it)

vanniktech commented 1 year ago

Currently working on a big feature, but will test 2.4.0 soon (building a new release of our thing)

guoyingtao commented 1 year ago

@vanniktech Just want to make sure if the latest Mantis version solved the issue or not?

vanniktech commented 1 year ago

My colleague hasn't tested this yet. He will do it by end of the week.

vanniktech commented 1 year ago

This is fixed. Thanks!

vanniktech commented 1 year ago

On second thought, my colleague can still get the same behavior when using Mantis 2.5.1 (that should contain the fix, right?)

See the below videos:

https://user-images.githubusercontent.com/5759366/219444870-c43ac8c9-9be6-4bfb-9580-54ce8ef032e6.mp4

https://user-images.githubusercontent.com/5759366/219444885-3f28292f-6bb2-48cb-bf76-5d9a9de9c977.mp4

guoyingtao commented 1 year ago

@vanniktech Thanks for the feedback. I tried the similar operations on my iPhone but still could not reproduce the bug. Can you help to try the things below?

  1. update Mantis tot the latest version
  2. Post the test pictures here then I can use the same pictures to have tests.

Also, can you also give some information of the iOS version and iPhone type your colleague is using?

Thanks!

vanniktech commented 1 year ago

Information:

Screen Shot 2023-02-18 at 21 41 57

These are the images:

WhatsApp Image 2023-02-18 at 6 39 33 PM (1) WhatsApp Image 2023-02-18 at 6 39 33 PM

guoyingtao commented 1 year ago

@vanniktech Thanks for sharing the test pictures. Can you also provide some information about the test phone like iOS version? Thank you!

vanniktech commented 1 year ago

That's in the first screenshot, no? iPhone XR with iOS 16.2

guoyingtao commented 1 year ago

@vanniktech I still could not reproduce it on my iPhone and I don't have an iPhone XR. Would it be possible for your colleague also test it on other devices too to see if it relates to devices or not? Thank you!

vanniktech commented 1 year ago

That's the thing. It is kind of happening only on this particular device. We've tried others as well and only he's able to reproduce this with his phone.

vanniktech commented 1 year ago

Another possibly related case:

IMG_6289

Probably also here the crop box extended and Mantis got confused and yielded an image which is not in accordance with the required 1:1 aspect ratio.

guoyingtao commented 1 year ago

@vanniktech I noticed this issue too and changed some code. Can you try the latest Mantis version to see if you can reproduce it? Thanks! If so, can you post the test steps and image here?

vanniktech commented 1 year ago

Alright, will update Mantis from 2.7.0 to 2.8.0 & report back.

guoyingtao commented 1 year ago

@vanniktech Since I haven't got the report for more than 3 months, I close this issue for now. You can reopen it whenever necessary.

vanniktech commented 1 year ago

Hasn't happened since, at least no one complained. Thanks for following up and sorry I didn't respond back.