callstack / react-native-image-editor

A library providing an API for cropping images from the web and the local file system.
MIT License
368 stars 117 forks source link

Cannot read property 'cropImage' of undefined #61

Closed dungnguyentri3110 closed 4 years ago

dungnguyentri3110 commented 4 years ago

Question

Hello, i just install ImageEditor and use it to crop my image. But when i do this action, have warning like this "Cannot read property 'cropImage' of undefined". This is my code const cropData = { offset:{x: 0, y: 0}, size: {width: image.width, height: image.height}, displaySize: {width: image.width, height: image.height}, resizeMode: 'contain' }

  ImageEditor.cropImage(image.uri, cropData).then(url =>{
    console.log(`LIST ITEM SELECT`, url);
  }).catch(error =>{
    console.log(`ERROR`, error);
  })