mavromatic home

Friday, September 28, 2007


iPhone Security Camera Viewer — Source Code!

Related Entries: Home Automation


Here is the source code to the cameraViewer. It’s ALPHA and not the greatest code, I only spent an hour throwing it together, so if anyone wants to help out and make it better, feel free. The concept is simple, when you load the main page “cameras.html” it pulls the images from your server. I use aspJPEG (you can use any free image resizer that works with your server platform) to resize the images to small thumbnails on the fly so they load faster over edge.

When you tap a camera, it displays the “view” mode and loads the camera image into the holder. If you rotate, the image scales to almost fit the landscape width and then it proceeds to load in a higher resolution version of the image. The Axis 241 series of servers allow for 320x240 and 704x480 as the two sizes. I scale down the smaller one for the thumbnails and the portrait view and the bigger one for the landscape view — it’s pretty cool!

I currently have it hardcoded to auto refresh every 15 seconds and only if in the view mode, I want to make it so if you have a faster connection it will pull faster.

There are still things I want to do with this, but for now, you guys can enjoy what I have so far!




 | Digg It



SPONSORED ADVERTISEMENTS






COMMENTS

Posted by jason at April 22, 2008 8:58 AM

Can anyone help me with this please. I have downloaded the source code but not sure how to add my cameras into it. I have 4 Axis network cameras. Please help. Thanks.



Post a comment












Remember personal info?




Comment Preview

Posted by:  on July 25, 2008 3:54:44 AM





Google

Web Site



ADVERTISEMENTS






CREDITS

Powered by MT 3.33.