react-native-perspective-image-cropper outside of image crop add white background in IOS

533 Views Asked by At

I use react-native-perspective-image-cropper package to crop image dynamically, and it’s work absolutely fine. But sometime when the cropping area overlay are outside of the image and I try to crop the image then it add the white background to replace the outside of the image area.

in Android it not add any white background but in IOS I face this issue.

enter image description here

enter image description here

1

There are 1 best solutions below

0
On

You need to make sure that the coordinates aren't bigger than the height/width of the image. It doesn't make sense to crop outside of the image itself.