jwagner / smartcrop.js

Content aware image cropping

Home Page:http://29a.ch/2014/04/03/smartcrop-content-aware-image-cropping

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base64

AlanSaracho opened this issue · comments

Hi! I try to use this library in React Native, but in react native i don't have HTMLImages for input.
Can i pass base64 image or something else?

Thanks!

I'm not sure how exactly the image handling work with react native but I'm sure there is a way. Once you figured that out you can provide you image operations to smartcrop like this: https://github.com/jwagner/smartcrop-gm/blob/master/index.js

@AlanSaracho Did you ever have any luck using this library in RN?

@bmovement As mentioned above you'd most likely need to write image ops. Not quite sure on what the Options for react native are, but in a pinch something using pure js like https://github.com/guyonroche/imagejs or https://www.npmjs.com/package/jimp should definitely work.