I have a scenario where I need to save an image from the <Image /> tag to the local file. The code does save the image to the file but i get an empty image, I know it's sound simple but I am new to NS and couldn't find anything on google, maybe someone knows why?
XML:
<page>
<image src="pic.png" id="img"/>
</page>
JS:
let img = page.getViewById("img");
let path = fs.path.join(fs.knownFolders.documents().path, "pic.png");
let src = ImageSource.fromNativeSource(img);
let saved = src.saveToFile(path, "png");
