Large panoramic images require large files, so the download time sometimes becomes a problem: the user has to wait a long time before seeing the panorama.
A first solution is to show a low resolution preview (it is a smaller image so it loads quickly) and then to load the panoramic image while the user is already seeing something.
Another solution is progressive loading: the panoramic image is divided in small tiles and the tiles are loaded in a fixed order. The user can see the tiles appear so he has a feedback of the loading process.
The problem with this approach is that the loading order is fixed, so if the user is interested in a particular view he may have to keep looking at the preview while the viewer loads tiles that are actually out of sight.
Another problem arises with virtual tours where different images are linked with hotspots: the same image may be linked by many other images, each link would open the same image with a different starting view (an example is a virtual tour of a building, where you can go to the same room from different rooms). The optimal solution would be to always load first the tiles needed for the current view, but this is not possible with a fixed loading order.
This version of PTViewer can perform dynamic progressive loading of a panorama divided in a number of tiles.
After loading an optional low resolution preview, PTViewer does not load the tiles in a fixed order, but it always loads first the tiles in the current direction of view, and it loads later the tiles that are "at your back". The loading order changes if you pan while the tiles are loading too, always loading first what you need to see at the moment.
This feature enhances the user experience when using larger images, since the time needed to "see something in the viewer" is greatly reduced.
Dynamic progressive loading can be activated specifying a special file in the file parameter of the <applet> tag. There are two different types of files:
To activate dynamic progressive loading the html code must change from
<applet...>
...
<param name=file value="pano.jpg">
...
</applet>
to
<applet...>
...
<param name=file value="pano.ptv">
...
</applet>
or
<applet...>
...
<param name=file value="pano.ptvref">
...
</applet>
This is the only change needed.
The .ptv and .ptvref file format specifications can be found here.
The new .ptv and .ptvref files can be created with a custom program (Windows only). Eric Gerds has created a Photoshop CS script that creates the .ptv or .ptvref files: it also works with Macs.
Known problem: Some web servers (like IIS 6) by default do not serve files with unknown extensions, but they send a "file not
found" error. To bypass this problem .ptv and .ptvref files can be renamed as follows:
pano.ptvref ==> pano.ptvref.txt
pano.ptv ==> pano.ptv.jpg
the trailing extensions do not need to be "txt" or "jpg" but they can be any extension known by the server.
PTViewer will understand that it is receiving a .ptv or a .ptvref file and it
will work as expected.
Known problem: often a single copy of ptviewer.jar is used in a site, so that upgrading the viewer is an easy task. Html pages in different folders use the codebase tag to locate the applet. It seems that using Sun Java V1.5 ptviewer cannot load correctly .ptvref files if the html page uses the codebase tag. As a workaround do not use the codebase tag but specify a path in the archive tag. For example, you can change from
<applet code="ptviewer.class" archive="ptviewer.jar" codebase=".." width=600 height=450>
to
<applet code="ptviewer.class" archive="..\ptviewer.jar" width=600 height=450>
This should solve the problem.