0

I am here to ask a simple question. can you convert the blob type into a base64 string type and then reverse that as well into the blob type? I have seen many and many answers but none is working fine. Please help only if you have tested at you end and that is working fine.

Thanks.

I tried this

var imageFile = Titanium.Filesystem.getFile('images8.png');
var oneImage = imageFile.read();
var tempFile = Titanium.Filesystem.createTempFile();
tempFile.write(oneImage);
var contents = tempFile.read();
var x = Ti.Utils.base64encode(contents);
4

1 に答える 1

0

解決策を見つけました。

var str = Ti.Utils.base64encode(imageview1.image);
Ti.API.info(str); 
var image2=Ti.Utils.base64decode(str); 
imageview2.image=image2;

乾杯

于 2012-12-11T11:22:35.430 に答える