Question

I am developing android and ios application using Titanium appcelerator, Now i need to draw or paint in my Activity and want to save that as a image.

-I have found this module Ti.paint module link

  • The above module works good , i can able to paint with this, But i can't able to save my gesture

I been searching and i couldn't find the way to save my painting..

Can anyone enlighten me guys...

Was it helpful?

Solution

I got the answer, to save my gesture paint..

Code is:

var filename = "savedPainting1.jpg";
var sigImg = paintView.toImage().media;
var img = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory, filename);
img.write(sigImg);

OTHER TIPS

use

var sigImg = paintView.toImage().media;

and save to your file system.

link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top