The Magic Lens is a Java applet. Like all magic tricks, it is simple once you understand how it is done. We first created a graphic image of the transcription text using PhotoShop and Illustrator such that words in the typed text would line up with the original handwritten words in an identically sized graphic when the two images are overlayed. The applet displays the handwritten image in "front", and only within the area of the box does the text image show through from "behind". This gives the illusion that the text is being transcribed on the fly as the user moves the box, but in fact there is a pair of static, stacked graphics of the same size whose area of display is determined by the user's movement and resizing of the box.
The Lens was one of the first things we developed on this project. It was simple in conception and the basic programming only took a couple of days of one student's time (graphic and user interface refinement took longer). Initially we thought we would use the Lens for document pages throughout the site, but we didn't end up doing that for many reasons, including the following: many browsers can't handle Java; those that can view Java applets experience significant delays in page loading time; browser fidelity to Java standards is uneven, making it hard to ensure that an applet will work and work consistently for all; Lens pages do not print from most browsers. There were also production cost issues; creating each text (transcription) graphic image requires approzimately 40 minutes of production time, and that estimate assumes the transcription work has already been done. It would have required over 900 graphic production man hours to make the Lens available for every page in Martha's diary.
The Lens, like the rest of this site, is copyrighted by Harvard University (see Use and Rights Information). If you would like more information about obtaining rights to use this Java code, please email us at firstname.lastname@example.org.