Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row" id="webCam">
- <div class="col-xs-12 col-md-12">
- <div id="my_camera" style="width: 210px; height: 190px;"></div>
- <button id="takePhoto">Take Snapshot</button>
- </div>
- </div>
- //capture image frome web cam
- function captureFromCam() {
- $('#webCam').show();
- Webcam.set({
- width: 200,
- height: 180,
- dest_width: 230,
- dest_height: 200,
- //image_format: 'jpeg',
- jpeg_quality: 90
- //force_flash: false
- });
- Webcam.attach('#my_camera');
- Webcam.setSWFLocation("~/jQuery-Plugin/webcam/webcam.swf");
- }
- function take_snapshot() {
- Webcam.snap(function (data_uri) {
- //document.getElementById('my_result').innerHTML = '<img src="' + data_uri + '"/>';
- $('#imgprvw').attr('src', data_uri);
- image = data_uri;
- $('#webCam').hide();
- Webcam.reset();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement