Let assume you have some image files in local file system, by using below code you can able to copy image to Clipboard.
var currIamge = 'test.jpg' // mention your image path and name
var imageFile = Titanium.Filesystem.getFile(currIamge);
var imageBlob = imageFile.toBlob(); // convert image file into blob using toBlob() method
Ti.UI.Clipboard.setData('image/jpg',imageBlob);
PS : Tested with iPhone and it works fine
what about remote images or images in a scrollableview?
ReplyDeleteYou can use toImage() method for convert your remote image view or scrollableview to blob data.
ReplyDeletevar blobObj = temoteImageView.toImage(); // convert image view to blob
Ti.UI.Clipboard.setData('image/jpg',blobObj);
hope this helps you