emulate cameraRoll.getImage()


is there any way of emulating this on the debuger ?


or at least how do i create an image object from a local image?

To create a FuseJS style image from a valid file path, all you need is { path:'path/to/my/image.png' }
It’s a very uncomplicated object. If you really want to emulate FuseJS images you’ll need to add the name, width and height fields too but the path is all the FuseJS APIs really use.


     ImageTools.getBase64FromImage({ path:'myFilePath.png' }).then(function(ImageBase){

does nothing… it does not crash either btw…

did i miss something?


try to add an error handler like:

     ImageTools.getBase64FromImage({ path:'myFilePath.png' }).then(function(ImageBase){
     }, function(err){ console.log(err); });

or just .catch(func...

“Unsupported platform”

Is it not possible to getBase64FromImage on preview? (Mac)

Hi Zaulin…

Unfortunately these methods have only been implemented for Android and iOS. I have created an internal ticket for also supporting this on local preview.