qtkrparse.php has two functions: The first part reads parameters and offsets of
images from a Quicktime VR file and creates from this a XML file, a file with the offset
info and a preview image. The second part loads the image data directly from the QTVR-file into the
krpano player with help from the krpano numbering and the offsets file.
The server must be suitable for KRPano of course and must be able to execute
PHP scripts. qtkrparse.php must reside in the same directory as the QTVR file(s) (it
is possible to mirror qtkrparse.php by mod_rewrite). PHP must have write rights in
krpano must be at least version 1.1.8.
The QTVR-files must contain only Jpeg-compressed images. Header compression is not
supported. qtkrparse issues an error message via krpano if such a file is found.
qtkrparse.php must be used with the QTVR file as GET parameter "mov" instead
of the XML file by embedpano:
qtkrparse.php includes a file krpano.inc if present. This file can
contain additional XML code since qtkrparse.php creates only a basic file containing
<krpano>, <preview>, <view>- and
<image> tag (with <level> sub-tag). All other tags must be
included through this file.
The following <view> attributes are read from the QTVR file: hlookat,
vlookat, fov, fovmin, fovmax, hlookatmin, hlookatmax, vlookatmin and
The following <view> attributes are preset by qtkrparse.php:
fisheye="0", fisheyefovlink="0.5", limitfov="true", camroll="0.0"
If hlookatmin - hlookatmax = 360° and vlookatmin - vlookatmax
= 180° (wich displays the whole sphere) limitview is set to
"lookat" else to "range".
to know the promise of the fisheye function of krpano:
var so = document.getElementById("krpanoSWFObject");
if called the first time with a particular QTVR qtkrparse.php writes two or three
files to the directory of the QTVR file. One with the extension of .xml, one with
.ofs and the optional .jpg preview image. The names of all files are
made up from name und extension of the QTVR file. my.mov f.e. results in
my_mov_kr.xml, my_mov_kr.ofs and my_mov_prv.jpg. All subsequent calls
read those files, except their creation date is older than the QTVR file or
qtkrparse.php. In this case new files are written. This can be forced with the
parameter cache=reset, f.e.:
If relative path should be used (f.e. to use a single copy of krpano for multiple
directories) they must be specified in the qtkrparse.php call, not in the QTVR file
These kind of calls can be used f.e. to determine the reason why a panorama won't display.
In order to use existing HTML pages with embedded QTVR without the need to create them again
convert2.php is enclosed (originally from the
Birdcap-package by Bernhard Vogl) To display an existing page with
krpano pass it as a parameter to convert2.php in a link, f.e.:
convert2.php replaces the <object> and
<embed> Quicktime tag by an appropriate call of embedpano.
If your .htm files containing QTVR panoramas can be recognized with a certain pattern the work can be done by some rewrite rules.
# switch rewriting on
# assuming your folder containing krpano, qtkrparse.php and convert2.php is /tools
# redirect all calls to convert2.php into /tools
RewriteRule (^|/)convert2\.php$ tools/convert2.php [L]
# redirect all calls to qtkrparse.php into /tools
RewriteRule (^|/)qtkrparse\.php(.*)$ tools/qtkrparse.php$2 [L]
# redirect all calls to krpano into /tools
RewriteRule (^|/)krpano\.(.*)$ tools/krpano.$2 [L]
# assuming all of your htm files containing QTVR panoramas are named *_qt.htm
# call convert2.php with the file name as parameter
RewriteRule ^(.*)/([^./]+_qt)\.htm$ /$1/convert2.php?file=$2.htm [L]
For questions, suggestions, comments and corrections please contact me