Home

Note: This is a static version of the Website that I am maintaining locally on my machine using Dokuwiki. The documentation is a work in progress and some of the links may not work as indicated.

What is Scripted Imaging?

Scripted Imaging is a small Java component that is used to create Web page graphics using instructions specified in a high-level programming language. The output raster image is in one of the common formats (JPG, GIF and PNG) understood by all Web browsers. The source is a script file with a Java-like syntax that is interpreted at runtime.

You can use scripted imaging to create simple graphics like background images for pages, sections and form elements, rounded corners for sections, etc. all without using an image editor like PhotoShop or GIMP. Complex usage scenarios involve creation of chart elements (pie chart, bar chart), UML diagrams and flow charts to name a few.

Summary of Features

Language and Scripts

  • Loose Java-based syntax for image scripts using BeanShell as the interpreter.
  • All instructions corresponding to class instantiations and method invocations using standard AWT/Swing packages.
  • Access to all Java packages and classes on the classpath.

Image Capabilities

  • Output image in multiple formats (JPEG, PNG and GIF).
  • Supports palette transparency. The output is either a 8-bit PNG or a GIF image.
  • Load arbitrary fonts from disk.
  • Load arbitrary images from disk. Images must be encoded in one of JPEG, PNG or GIF.

Deployment

  • Can be deployed as part of a Web application in a servlet container.
  • Can be executed from the command line for pre-generation of images.

Dynamics

  • Modifications to scripts loaded dynamically in a servlet environment.
  • Has access to HTTP request parameters, session and servlet context attributes when deployed in a Web server.
  • Has access to command line parameters when deployed in a console environment.
  • Caching of non-dynamic images for faster access.

Platform Requirements

Scripted Imaging should run on all platforms for which a Java Virtual Machine implementation is available. The current release has been tested to work fine on Microsoft Windows 2000/XP. Deployment on a Linux/Solaris OS should not pose any problem.

The recommended JVM is the one provided by Sun Microsystems as part of Java 2 Standard Edition. The target JVM version is 1.4.2 but the binaries should be upward compatible with Java 5 and 6.

For deployment in a Web environment, you will need, at the very minimum, a servlet container conforming to version 2.4 of the specifications. Support for Java Server Pages is not necessary.

start.txt · Last modified: 2007/04/15 19:21 by indroneel
Best viewed with Mozilla FireFox 2.x under 1024x768 and millions of colors. Experience on other browsers may vary.
Contents copyright © Indroneel Das, One Man's Dream.