cristian0791 / react-native-image-cropview

A React Native module that allows to show a crop viewer over images.
MIT License
16 stars 3 forks source link

issue getting image size #1

Open vbylen opened 2 years ago

vbylen commented 2 years ago

Hi @cristian0791

Thanks for publishing an awesome library.

How would you get getImageSize to work without using the react-native-image-size library?

I tried just passing a simple object like this:

{ height: 1000, width: 1000 }

to the getImageSize prop but it's not working for some reason.

Would you mind testing this on your end?

Thanks!

cristian0791 commented 2 years ago

Hi @vbylen

getImageSize needs to return the original width and height of the image. You can use any other tool to find them or maybe your image picker returns them. Using random numbers is not indicated.

See the example app for more implementation details.