JPEGCam: Take picture from your webcam and submit to any server.

27 Jan, 2010, by appsheriff || Topics: Flash

The JPEGCam capture images from a webcam and submits to any server. It is basically a combination of an open source Flash and the JavaScript library that allows you to insert a custom-sized Flash movie in a webpage that would capture the Webcam snapshots. After capturing these snapshots, it can be submitted to any server in the JPEG format as the download package comes with the sample PHP 5 code.

webcam-to-website server

The webcam is activated with the Flash movie. It includes a full-canvas camera control that has no flash user interface elements. The user can decide on when to take the snapshot and then click a button to do the same.

Every control that is used for displaying the Flash device configuration panel and taking the snapshots is handled from the Javascript. It helps in controlling the user interface and also in using your own buttons and layout.

The requirements for the JPEGCam are Javascript-enabled browser that is tested on Safari 3.0 Mac OS X Leopard, Firefox 2.0 Mac OS X Leopard, MSIE 6.0, 7.0 Windows XP SP2, Firefox 2.0 Windows XP SP2 , Chrome 0.3 Beta Windows XP SP2 and also a Flash player 9 and 10. For installation purpose, first you will have to copy the webcam.js, webcam.swf and shutter.mp3 files to your web server.

So in short, the JPEGCam is a simple, Flash and Javascript library that would enable your users to submit the Webcam snapshots to your server in the JPEG format. The Flash movie is of variable-sized and has got no visible user interface controls. All the commands sent to the movie are done from the Javascript. By doing this, you can implement your own look and feel on your site, make your own buttons and also tell the Flash movie what you want to do from your own code. In the server side code, the Flash movie creates a HTTP POST to your server-side script using the Content-Type ‘image/jpeg’. This is a not a standard method that is unlike submitting a form from the web page. Incase you are using the PHP, the JPEG data will not be in the normal $_POST associative array. Instead you should be reading it from the special PHP wrapper: ‘php://input’.

Bookmark and Share

One Response so far | Have Your Say!

  1. This is a great idea. It seems simple enough and could come in handy. I also see where it could be easily exploited though.

Leave a Reply