castle amber

Webcam Java applet "AmberCam"

The AmberCam Java applet magnifies your webcam image 200%. This reduces bandwidth or allows you to update the image more often. For example blow up your 160 x 120 pixels image to 320 x 240. The Java applet uses a simple interpolation method which makes the image a bit unsharp.

See more Java applets in action.

Download AmberCam

Use the button below to download the Ambercam.zip file. If you don't want to give your email address leave the field blank. Please, don't enter a bogus email address.

Email address:

Installation of the Java class file

Unzip the AmberCam.zip file after downloading. Upload the Java class file "AmberCam.class" to a directory on your website. Make sure that you use binary mode to transfer the file via FTP.

Add the following HTML code to the HTML page you wish to have the AmberCam Java applet on:

<object codetype="application/java"
  classid="java:AmberCam.class"
  width="320"
  height="240">
  <param name="copyright"
value="(c) Castle Amber, 1998 http://www.castleamber.com/">
  <param name="url"
value="http://yoursite/test.jpg?">
  <param name="refresh"
value="3">
  Java is needed to see the AmberCam applet
</object>

This code example uses the recommended way to embed a Java Applet, see APPLET is deprecated in favor of OBJECT

Change the following values:

width and height
Use width times two and height times two of the actual image. For example if your image is 160 x 120 pixels enter width="320" and height="240".
url
The full URL of the image your webcam creates. Note that you have to add an additional question mark. Due to a bug in some browsers this is needed to prevent caching of your image. If you use a CGI script to generate the image you must also add the question mark. If your script already needs some parameters to work properly try to add an additional parameter. For example
 http://yoursite/cgi-bin/webcam.cgi?shutter=10
becomes
 http://yoursite/cgi-bin/webcam.cgi?shutter=10&extra=
refresh
The time in seconds between images. Unlike some other Java webcam applets the download time is not added to this time.

Feedback

Please add a link to http://castleamber.com/ if you like this Java webcam applet.

Please contact me if you encounter problems, have a suggestion or just to say you like the Java applet.

See also

Recommended links