Added 0.40 compatibility and updated usage in README#13
Added 0.40 compatibility and updated usage in README#13syousif94 wants to merge 13 commits intomeznaric:masterfrom syousif94:master
Conversation
|
Thanks for PR. I somehow missed it. I will merge it in next couple of days. |
|
|
||
| - (void)handleImageLoad:(UIImage *)image { | ||
|
|
||
| // hardcoded downsample of image |
There was a problem hiding this comment.
Why would we want that? I think it makes more sense to keep original size.
There was a problem hiding this comment.
Hi sorry, I did not realize further commits would modify this pull request. I think it would be helpful to let users set a max resolution though because loading a cropped full resolution photo from the camera album has a noticeable delay on my 6S. I can add that feature or just close this pull request.
There was a problem hiding this comment.
I think it's a good feature to have especially if delay is noticeable. Did you think about JS API already?
So far we have:
.cropImageWithUrlAndAspect(imageUrl, aspectRatio)
.cropImageWithUrl(originalImage.uri)
without breaking backwards compatibility we could introduce something like
.cropImage(originalImage.uri, options)
where options would be:
{
maxWidth: 150, // optional, default no max width
aspectRatio: ReactNativeImageCropping.AspectRatioSquare, // optional, default not locked
}
It would be easy to extend as well.
There was a problem hiding this comment.
Yeah sounds good, I'll update the pull request over the weekend.
I updated the headers for react-native 0.40 and updated the JS in the usage instructions.