Michaelvilleneuve / react-native-perspective-image-cropper

Perform custom crop, resizing and perspective correction 📐🖼
MIT License
305 stars 128 forks source link

Enhancement - Better control off image scale and position #22

Open nimrod-zg opened 5 years ago

nimrod-zg commented 5 years ago

Hi! Thanks for taking the time to make this 😄

We're facing an issue with the way the library handles positioning the image - it's set to absolute position 0,0, and it gets stretched under other elements and even outside the screen.

Is it possible to get more control over the way the cropper positions the image? To have it scaled down to fit a parent element?

Here's a picture (of my floor, pardon the lack of creativity 😬) to give an example of the issue as we're facing it right now -

screenshot-1559320218910

As is visible, the image is stretched under the bottom bar and outside the boundary of the screen. The initial coordinates for the corners are set to near the corners of the image, and as is apparent, the bottom ones aren't visible.

Is this a possible enhancement?

zahidahmed024 commented 5 years ago

@nimrod-zg can you give me your code ?? :'( .i've been trying for two days -- ,and failed ? i only get one point instead of getting four point -- .

nimrod-zg commented 5 years ago

Sorry @zahidahmed024, proprietary code 🤷‍♂ Maybe reduce your code to the bare minimum and publish a stack overflow question?

zahidahmed024 commented 5 years ago

hey did you find the solution of your problem ?? im also having this issue @nimrod-zg