2

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...

GK_
  • 1,212
  • 1
  • 12
  • 26

2 Answers2

2

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);
MarmiK
  • 5,639
  • 6
  • 40
  • 49
GK_
  • 1,212
  • 1
  • 12
  • 26
2

use

var sigImg = paintView.toImage().media;

and save to your file system.

link