jonathanrcarter / CameraView

CameraView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CameraView

This is a clone of Dino4674's Camera Viwe but I added the fucntion takePic() to take a picture

Usage is:

if (Ti.Media.isCameraSupported == true) {
  var imagePicker = require('ti.camera');
	camview2 = imagePicker.createView({
	    width : 320,
	    height : 320,
	    top:0,
	    left:0
	});
	camview.add(camview2);
	camview2.addEventListener("snapped", function(e) {
		Ti.API.debug("CALLBACK SNAPPED");
		Ti.API.debug(e);
    // e.media contains the snapped image
		snap = e.media; // this is just an example
		showImage(e.media); // again this is only an example 
	});
}

var b1 = Ti.UI.createButton({
  title : 'Take PIC'
});
var tapclick = function() {
	camview2.takePic();
};
b1.addEventListener('click',tapclick);
botview.add(b1);

About

CameraView

License:Other


Languages

Language:Objective-C 47.2%Language:Python 28.7%Language:Perl 20.8%Language:JavaScript 3.2%Language:Shell 0.1%