Applet Version 2.0
Click the screenshot to launch a live example ("grant the session" when so prompted) . . .


Click to Launch a Live Example



New in Version 2.0: Mac OS X compatability; ability to save and re-open applet in any state; add images from your local file system to the display; captions for images; improved behavior for image selection and movement; various small fixes and enhancements.

The applet version of the Lightbox is a flexible tool for online image comparison. Unlike the application version, it has no peer-to-peer capabilities. It does, however, offer a display area in which an indefinite number of images can be moved, juxtaposed, and repositioned (and resized) at will; the applet also offers a few simple image processing functions (currently contrast adjustment, color to greyscale conversion, and inversion). Users can save the state of a session, re-open a previous session in its saved state, and add individual images to the original dispaly. The applet's primary audience is developers who wish to add an image comparison tool to a Web-based image collection. Clicking the screenshot above will launch a live example (grant the session when so prompted). We've also collected some additional examples here.



Of course the above images are only a sample--the content of the Lightbox can be whatever you like once you've obtained your own copy of the applet. To implement a copy of the Lightbox, you will need to first download the lightapp.jar file from the Download area above, and mount this file on your own server. Be sure to transfer it to your server in binary mode if using FTP. The Web page which calls the Lightbox must contain a version of the following applet code somewhere in its HTML:

<applet CODE="LightApp.class" ARCHIVE="lightapp.jar" WIDTH="1024" HEIGHT="768">
<param NAME = num VALUE="6">
<param NAME = tile VALUE="yes">
<param NAME = filename0 VALUE="ceiling1.jpg">
<param NAME = title0 VALUE="Sistine Chapel Ceiling View 1">
<param NAME = filename1 VALUE="ceiling2.jpg">
<param NAME = title1 VALUE="Sistine Chapel Ceiling View 2">
<param NAME = filename2 VALUE="ceiling3.jpg">
<param NAME = title2 VALUE="Sistine Chapel Ceiling View 3">
<param NAME = filename3 VALUE="ceiling4.jpg">
<param NAME = title3 VALUE="Sistine Chapel Ceiling View 4">
<param NAME = filename4 VALUE="hands.jpg">
<param NAME = title4 VALUE="Hands (Detail)">
<param NAME = filename5 VALUE="creation.jpg">
<param NAME = title5 VALUE="The Creation">
</applet>

Things to notice:

  • "height" and "width" for the applet may be defined as desired
  • The value of the parameter "num" is the total number of images that will be displayed in the Lightbox
  • The value of "tile" (yes/no) determines whether or not the images load already tiled
  • Each image that is to be displayed requires its own parameter, named incrementally as "filename[n]", starting with "filename0"
  • The value of each parameter "filename[n]" is the name of the corresponding image file
  • There is a parameter "title[n]" whose value is the title of the image filename[n] as it appears in the applet on mouseover

We assume that in most cases developers will want to populate the applet dynamically rather than hard-coding its content. We'll post samples of scripts as soon as we can. We'd also appreciate receiving your scripts.

When the Lightbox applet is first loaded, users will be asked if they wish to "grant the session." Users must do so in order for the Lightbox to launch. Permission is necessary because of the features that allow the Lightbox to upload files from the user's local machine. There are no known risks associated with granting a Lightbox session.

The buttons in the applet toolbar function as follows:

Saving a session produces a file with a .vlb extenson, which the user saves locally on his or her machine. This is not a composite image file; it is simply a plain text record that describes the internal state of the applet at the time it is saved. Users may open a previously saved session so long as the paths to its constituent image files have not changed. The two additional options allow a user to manually add an image from his or her local machine to the displayed image set, and to clear the Lightbox surface completely (desirable before loading a previously saved session).

Image titles (or filenames if no title is defined) are visible upon mouse-over of the image in the Lightbox.

The thumbnail icons displayed along the bottom edge of the applet toggle their corresponding images on or off:

  

Image titles (or filenames if no title is defined) are visible upon mouse-over of the thumbnail.

Technical Requirements

The Lightbox applet has been tested and runs on both Windows and Macintosh OS X.

The applet requires Java 1.3+ and a browser capable of supporting Java Swing Classes. These include Internet Explorer 6.0+ and Netscape 4.78+.

Java 1.3+, which IE users must install as a plug-in, is available here:

http://java.sun.com/j2se/1.3/

After installing the Java plugin:

  • For Internet Explorer, select Tools/Internet Options/Advanced, scroll down to Java (Sun), and click on Use Java for the applet.
  • Click on Java Plugin in the Windows Control Panel, click on Browser Settings, and make sure that the browsers IE and Netscape are selected.
  • On Netscape, please make sure the Java plug-in is enabled under Preferences/Advanced.

The Lightbox currently supports GIF, JPEG, and PNG images.

Here are some things we'd like to have in the future: annotation, image rotation, magnification of discrete regions, transparency/opacity control for overlapping images, image cropping, and additional image processing functions.

back