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
- Windows: Internet Explorer, Firefox *
- Mac OS X: Safari, Firefox *
- UNIX and Linux: Chrome, Firefox *.
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:
- A fully configurable interface to provide the user with as much functionality as required to perform their tasks.
- Enlarge or reduce the image size, or zoom to fit image area of the applet. Zoom level is governed by enlarge/reduce controls and Zoom menu. The center of the current image view is the center for the zoomed in/out image view. The zoom menu allows zooming to 200%, 150% 125,% 100%, 80%, 50%, 40% of image size, or zoom to fit applet image area. Zooming in or out further may be accomplished by the zoom in/out buttons. Zooming in to a particular area of the image may be accomplished by dragging a rectangular area on the image with the mouse (see below).
- Panning of image by using the hand cursor and clicking and dragging on the image.
- Rotate: 90, 180, 270 degrees (at any zoom factor)
- Move to top and bottom of page.
- Scale to gray: enable/disable (default is enabled, toolbar button is optional).
- Page forward/back and goto page. Using seperate files ending in page numbers for each page or multipage TIFF images in a single file.
- Selecting a file name to view a different image.
- Printing the document scaled to fit on the output page. Printing will take advantage of the full resolution of the image file for best clarity on paper. A print dialog will be displayed allowing the user to print a single page or a range of pages from a set of numbered image files or a multipage TIFF file.
- Saving the document to a local file (as a multipage TIFF or a series of single page TIFF files).
- File encryption on the server to prevent download and use except through the viewer.
- Read ahead caching of multi-page documents to improve page-to-page response when accessing a server over a slow link.
- Download of image files to a local disk cache to support faster viewing at a later time.
- Secure document transfer by using SSL.
- Issuing a request to a CGI to perform printing at the server or request off-line images.
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:
- TIFF
- JPEG
- PNG
- GIF
- BMP
- HPGL
- MODCA
- CIT
All TIFF compression methods supported:
- CCITT Group 4
- CCITT Group 3 1-D and 2-D
- TIFF Mode 2 (a variation of CCITT Group 3)
- JPEG
- PackBits
- LZW 8 bit and 32 bit color
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.