Thread is closed for posting
2 posts, 1 answers
  1. Dimitar
    Dimitar avatar
    66 posts
    Member since:
    May 2014

    Posted 27 Aug 2017 Link to this post

    as a result from image-cache I have an Image class  . When I trace is  : . I am trying to save it as file on local , but I it seems I am doing mistake . There are some examples, but most of them using camera imageAsset .

    So I am trying something like this where image is result from casheImage.push , which is .  

    let source2 = new imageSource.ImageSource();
    source2.fromAsset(image).then((source2) =>
        let folder2 = fs.knownFolders.documents().path;                                   
        let path2 = fs.path.join(folder2, self._imageSrc);
        let saved2 = source2.saveToFile(path, "png");
            console.log("Saved image To Hard Disk Local Cashe") ;
  2. Answer
    Nikolay Tsonev
    Nikolay Tsonev avatar
    340 posts

    Posted 28 Aug 2017 Link to this post

    Hi Dimitar,

    I investigate your scenario and found that you could use fromNativeSource method provided by ImageSource module. It will allow you to create a NativeScript image source object from the native image object.
    Regarding that for more info about the method and expected input params, please review the above-attached link.

    Best Regards,
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top