PTViewer 2.8 reference
This page contains a detailed list of the new features of PTViewer 2.8:
please note that it only explains the differences between PTViewer 2.8 and the
original PTViewer 2.5.
You can find the full version 2.5 documentation at Helmut Dersch's site: http://webuser.fh-furtwangen.de/~dersch/
or at a mirror site like http://www.path.unimelb.edu.au/~dersch/.
Another site that contains a lot of information about PTViewer is http://users2.ev1.net/~wufdog/PT/.
New features (general)
- The computation of each frame is now faster, so panning is faster and smoother.
It is now possible to show large images with a good speed. Click here for information about showing
large panoramic images.
- Using the previous versions, when panning very slowly the borders of the
image moved in a jerky way. This was easier to notice when using a big
window on a fast computer. With this version the movement is smoother.
- With the Sun Java VM version 1.4 or later, ptviewer can now draw to the
screen using hardware acceleration. As a result, on a Windows computer it is
now as fast with the Sun VM as with the Microsoft one.
ending with ";" does not cause an exception any more. The
";" is used as a separator between multiple commands.
- Rik Littlefield (rj.littlefield at computer.org) has rewritten the image loading code: now it is much faster,
especially with larger images. As a consequence the "maxarray"
parameter is no longer used by the applet. Using maxarray will not cause errors, but it will
- Added support for the .PTV custom file format. With this format it is
possible to load larger images. The applet
always loads first the parts of the image in the current direction of view, and it loads later
the parts that are "at your back". It is possible to encrypt the .ptv
file so that it will not be possible to use it from another site. Click here for
more information. A program for the custom file creation is available from
here. Eric Gerds has created a Photoshop
CS script for the custom file creation: it also works with Macs. Three sample images are available from
- Now it is possible to press the "Y" key to zoom out, just like
the "Z" key. This feature is useful for certain keyboard layouts.
New features (new or changed parameters)
- The "quality" parameter can now be set to a value greater
than 3 to activate a Lanczos2 interpolator.
This interpolator generates sharper images but is much slower, so it is used
only when the user is not panning. The new values are 4, 5 and 6: 4
means nearest neighbor when panning, Lanczos 2 when steady. 5 means
bilinear when panning and Lanczos2 when steady, 6 means nearest neighbor
when panning quickly, bilinear when panning slowly and Lanczos2 when steady.
Nearest neighbor when panning is the fastest option, but it causes a lot of
artifacts (shimmering) while panning slowly. Bilinear greatly reduces
artifacts but it is slower. Quality = 6 tries to achieve a balance between
quality and speed: when panning slowly artifacts are more noticeable and
speed is less important, while when panning quickly artifacts are less
visible and speed is more important. Quality = 6 is now the default. The quality advantage
of the Lanczos2 interpolator is greater as you zoom into the image.
- Added new parameter "showToolbar" (default = false). If set to
true ptviewer shows an integrated toolbar with three buttons: zoom in, zoom
out, toggle hotspots. The toolbar works as a progress bar too: this progress
bar also shows the progress in tile loading of .ptv files. The
toggle hotspots button changes its appearance when the hotspots are
activated, so users can know if hotspots are active or not. When moving the
mouse over a hotspot the hotspots' description is
written in the toolbar too, where it should be more easily seen by the user.
The toolbar is painted before static hotspots, so it is possible to
set static hotspots on the toolbar to create more buttons.
- Added new parameter "toolbarDescr_x". The value must be an
integer number and it can be used to change the x coordinate where the
hotspots' description is written on the toolbar. It is useful if you have
added new buttons to the right of the standard ones.
- Added new parameter "toolbarDescr_color" to set the color of the
in the toolbar. The parameter must be set to a hex value like other PTViewer
parameters used to set colors. The default is black. This value is overridden by the "c" parameter in the hotspot's definition (if any).
- Added new parameter "toolbarImage". It is only meaningful if
showToolbar is true and can be used to customize the toolbar's appearance.
You can click here for more information.
- Added new parameter "imgLoadFeedback" (default = true). If set
to false ptviewer will not show neither a progress bar nor a progress
percent number. This is mainly useful when using the toolbar that already
shows its own progress bar.
- Added new parameter "toolbarBoldText", default=false. If set to true the hotspots description in the
toolbar will be written in bold
- Added new parameter "hsEnableVisibleOnly" (default = false). If set to true hotspots will be disabled
if not visible. I didn't like casually jumping to another pano while panning
with the hotspots set to invisible.
- Added new parameter "hsShowDescrInStatusBar" (default = true). If set to false
the applet will not show the hotspots' description in the browser's status bar when the mouse moves over a hotspot.
- Added new parameter "popup_panning" (default = false). If set to
true hotspots will pop up under the mouse when the user is panning with the
mouse. This parameter was originally added by David Buxo to his version of PTViewer.
Static hotspots parameters
- Added new parameter "shsEnableVisibleOnly" (default = false). If set to true
static hotspots will be disabled
if not visible. This parameter is similar to "hsEnableVisibleOnly"
that works for hotspots.
a new functionality that allows multiple static hotspots to be drawn, hidden and popped up at
once. DrawSHSImage(), DrawSHSPopup() and HideSHSImage() now allow more than one static hotspot to be changed in a single call. The commands are now able to accept static hotspot ranges e.g. 1-4 or 1,3,5,6 or combinations of both 1-4,7,8.
- Robert also added a new parameter "shsStopAutoPanOnClick",
by default it is set to true. When you set it to false, clicking on a static hotspot will not stop an
- These new features make it possible to create dynamic menus for PTViewer
using nothing but static hotspots. Robert has written a tutorial
about dynamic menu creation.
- Added new features in static hotspots declaration: "y" and "b" values can be
negative. If negative they are computed from the bottom of the viewer window and not from the top.
"x" and "a" values can be negative: if negative they are computed from the right
of the viewer window and not from the left.
"x" must compute to a positive number lower than "a".
"y" must compute to a positive number lower than "b".
- Added new parameter "mouseSensitivity", it is a decimal
number (the decimal separator must be a period, not a comma), default = 1. If mouseSensitivity < 1 panning will be slower, if mouseSensitivity > 1 panning will be faster.
- Added new parameter "mouseQ6Threshold" used only if quality=6. It is a decimal number, default = 1.
mouseQ6Threshold > 1 will require a larger mouse movement to switch from bilinear to
nn, mouseQ6Threshold < 1 will require a smaller mouse movement to switch from bilinear to
- Added parameter "mousePanTime" used to limit the maximum speed when panning with the mouse. It works like "autoTime": it is the minimum time (in seconds)
for a full 360 degrees revolution. Inexperienced users tend to drag too
much the mouse so the image rotates too fast, causing confusion: this parameter
limits the maximum panning speed and it works with any cpu speed. You can
use decimal values, the decimal separator must be a period ("."),
not a comma (",").
- Added new parameter "autoTime". It is used only if the parameter
"auto" has been used to cause autorotation. The value of the
"autoTime" parameter is the number of seconds needed to perform a
full 360° rotation, so <param name="autoTime" value=120>
will cause PTViewer to make a full rotation in two minutes. Of course if the
computer is not fast enough PTViewer will not be able to rotate fast enough.
This parameter can be used to make the viewer rotate at the same speed on
every computer: on faster computers the CPU usage will be lower than 100%.
The value must be an integer number, without decimals.
- Added a new function "startAutoPan( pan_inc, tilt_inc, zoom, autoTime
)" that can be used to start autopanning with a given value for
- Ercan Gigi (ercan.gigi at philips.com) added the "autoNumTurns" parameter which is used
to limit the number of full 360 degree turns when auto-panning is on. You
can use decimal numbers. The parameter is useful if you want to give only a
short autopan preview.
- Tore Meyer (Tore.Meyer at gmx.de) added an optional parameter "autoTime" to
moveTo() and moveFromTo().
public void moveTo(double pan, double tilt, double fov, int nframes, double
public void moveFromTo(double d, double d1, double d2, double d3, double d4, double d5, int i, double
The behaviour is identical to the original moveTo() & moveFromTo() Functions with the autoTime behaving just like the
autoTime parameter introduced in version 2.7L2.
- Added new parameter "outOfMemoryURL": it is the address
of a page to be opened in case of out of memory error while loading the panoramic
- Added new parameter "horizonPosition" (integer, no
decimals) to specify the position of the horizon if it is not in the middle of the pano image.
Without this parameter PTViewer would show a curved horizon. The parameter
is a % value of the image height, measured from the top. The default value
is 50 and the horizon is considered to be in the middle of the image. If the
value is less than 50 the horizon is nearer to the top of the image, if it
is greater than 50 the horizon is nearer to the bottom of the image. For
example, if you have a pano 1150 pixels high and the horizon is 430 pixels
from the top then the parameter value is 430/1150*100 = 37.
- Pressing "o" will interactively decrease the value of the horizonPosition parameter with feedback in the status bar,
pressing "O" will increase it. This is useful to quickly find the correct value for the parameter. Hotspots position will not be updated since it would require more work and this feature is not intended for production use.
- Added parameter "authoringMode" (default = false). If set to true it will enable
authoring features that could have unexpected results for end users. At the moment it will
only enable the "o" key (see above).
- Added parameter "statusMessage": it can be used to specify a fixed text to be written in the status bar. The text is written
every time the user drags the mouse or presses an arrow key.
This parameter does not work with Firefox (for security reasons).
- Changed: now the "tiltmax" parameter accepts negative values and the
accepts positive ones.
- Added two public methods: getPanoIsLoaded() and getFilename(). You can
getPanoIsLoaded() returns a boolean value: true if the pano has already been
loaded, false otherwise. getFilename() return a string: the file name of the
- The mouse cursor did not change to HAND when over a hotspot and using the Sun
- Pressing the spacebar did not show hotspots until the pano was dragged.
- A custom mouse cursor did not show up until the mouse was moved.
- When diplaying a wait image with the Sun VM the background of the applet
was not set to the color specified by the bgcolor parameter.
- If the panoramic image was not fully spherical, i.e. the tilt angle
did not go from -90° to + 90°, hotspots were displayed at a wrong y
- Modified the gotoView() and moveTo() commands: now if the requested
vertical field of view is too large for the current pano, it is
automatically reduced. In previous versions the viewer did not change the
direction of view.
- If the tilt parameters requests an impossible direction of view (outside the
pano) now the the tilt angle is set to the maximum or minimum possible value.
set it to 0.
- Fixed: when using nn interpolator rectangular hotspots were not painted correctly while panning.
- Fixed: when loading a pano that was not tall enough to fit in the current window
using the current fov ptviewer reduced too much the fov value. Now fov is reduced to the correct value that will not require vertical panning.
- Fixed: the applet did not load images (like a wait screen) if they were packed in the jar file.
- Fixed: parameters specified in a "pano0", "pano1" (and
so on) tag were case-sensitive, while normal parameters were
case-insensitive. Now those parameters are case-insensitive too.
PTViewer home page