ViewTIFF for Java
applet for image viewing and document processing

ViewTIFF for Java Technical Specifications

The ViewTIFF applet is used for viewing and printing color, grayscale and black and white documents in a wide varity of formats.  The applet decompresses the file as it is being received, so if the TIFF tags are at the start of the file, decompression time will overlap the file transmission time, thus putting the image on-screen much sooner. The applet fetches the images from the same server that downloaded the applet or a different server - the browsers allow this because the applet is digitally signed. The directories (URL locations) that contain the TIFF files are specified in the applet's parameters, and may optionally use HTTP or FTP protocols and may use CGI or ASP instead of a simple directory. The ViewTIFF for Java imaging applet can be used in a number of ways as follows:

1) The user types the image name or number into a name field in the applet's window. Also, the user can be given the option to select a document type from a pull-down menu. The imaging applet retrieves the document from a URL (path to a location), or passes the user entered information to a cgi or asp which returns the user's document.

2) The user clicks a link or button to invoke a JavaScript function that passes the image name to the imaging applet. In this case the name field in the applet window is optional and can be removed to allow users to retrieve files only through links.

3) Another Java applet chooses the TIFF file (through its own user interface) and passes the file name to the imaging applet using Java to Java communication. As with JavaScript, the name field in the applet window is optional and can be removed to allow users to retrieve files only through the secondary appet UI.

4) The imaging applet displays a thumbnail version of the image. The user clicks on the image and the applet invokes a URL to display a full size version in the same or another window.

Note that the TIFF files need not be stored with a ".tif" or ".tiff" extension as the applet ignores the MIME type of the file and simply checks the header for the correct format.

Browser Support

ViewTIFF for Java works with Java-capable web browsers, including

Most modern browsers have removed or begun the process of removing support for Java. If you are looking for a solution supported by all major modern browsers, check out ViewTIFF Universal, which does not use the Java plugin. For more information on which browsers support ViewTIFF for Java and ViewTiff Universal, see the ViewTIFF compatibility chart.

(*) Firefox will remove support for Java in version 52, to be released in March 2017, but will continue to allow Java in the Extended Support Release at least until 2018.

User Features

When you display an image, there is an optional tool bar on the top. This toolbar contains buttons with mouse over help that allow for zooming, rotating, panning, top/bottom of page. Optionally, depending on the applet parameters there may be controls for paging forward and back, going to a specific page or opening a new TIFF image by name. Optionally there may also be toolbar buttons for printing, annotating, local file saving, scale to gray control, displaying a help file from a URL into a subwindow, and generating CGI requests for remote printing or offline file retrieval.

Feature list:

Clicking and dragging in the image area will draw a dotted zoom rectangle. When the mouse button is released the image will be zoomed to show the area define by the zoom rectangle in the image area. Double clicking on the image area while holding the shift key down will zoom the image to fit the image area. Holding down the control key while clicking and dragging in the image area will pan (drag scroll) the image.

Image Formats Supported:

The set of image formats supported are:

All TIFF compression methods supported:

Both Intel 'II' and Motorola 'MM' style byte ordering in the header, and both single and multi-page are supported. The lastest TIFF, version 6, is supported.

TIFF Tags Supported:

ImageWidth
ImageLength
BitsPerSample (must be 1,2, 4, 8 (3 Samples per pixels yields 24 bit color))
SamplesPerPixel (must be 1, 3 or 4)
Compression (types 1, 2, 3, 4, 5, 6, 7, 32773)
Predictor (for LZW horizontal differencing)
PhotometricInterpretation (0,1,2,3)
ColorMap
PlanarConfiguration (must be 1)
Orientation (90 degree rotations values: 1 thru 8, the image will be automattically rotated to be right side up.)
TileWidth (tiling is fully supported)
TileHeight
TileOffsets
TileByteCounts
StripOffset (can be many strips)
StripBytesCount
RowsPerStrip
Group3Options
Group4Options
XResolution
YResolution(May be approx half X resolution for low res faxes))
FillOrder tag for reverse bit ordering
Resolution Unit (Centimeter or Inches)
PageNumber (multipage TIFF must also be enabled with a parameter)
JPEGInterchangeFormat
JPEGInterchangeFormatLength
Wang/Kodak Annotations (tag 32932)

All other tags will not produce an error, but will not be interpreted. Decompression begins as soon as the header arrives, so display will be faster if the header comes first. Multi-page TIFF is supported.

JPEG and GIF images are decompressed directly by the Java engine for fast decompression,

For PNG format the entire PNG suite is supported, including interlacing, all bit depths (48, 32, 8, 4, 2, and 1) and alpha components and all filter types.

For BMP format bit depths 32, 8, 4, 1 are supported with or without RLE compression. The Windows and OS/2 header formats are supported.