german
english
QTVR-Dateien für KRPanoqtkrparse.php hat zwei Funktionen: Der erste Teil liest aus
einer Quicktime VR Datei die Parameter und Dateioffsets der
Bilddaten und erzeugt daraus eine XML-Datei, eine Datei mit der
Zugriffsinformation und ein Vorschaubild. Der zweite Teil lädt mit Hilfe dieser
Information und der krpano-Nummerierung der Kacheln die Bilddaten
direkt aus der QTVR-Datei in den Flash-Player.
qtkrparse.php
muß im gleichen Verzeichnis wie die QTVR-Datei(en) liegen (es ist
möglich, qtkrparse.php per mod_rewrite
einzublenden). In diesem Verzeichnis muß PHP Schreibrechte
haben.qtkrparse.php wird mit der QTVR-Datei als
GET-Parameter "mov"
statt der XML-Datei an krpano.swf
übergeben. Es empfiehlt sich hier die Methode mit Javascript per
SWFObject zu verwenden, z.B.:qtkrparse.php benutzt einen großen Teil des Codes von qtparser.php. Siehe http://fieldofview.com/spv-dev/projects/qtparserqtkrparse.php bindet generell eine
evtl. vorhandene Datei krpano.inc ein, die
zusätzlichen
XML-Code enthalten kann. qtkrparse.php erzeugt
mit <krpano> nur das äußere
Gerüst und das <view>-tag, so
daß alle anderen tags mit Hilfe dieser Datei eingebunden werden müssen.Die folgenden <view>-attribute
werden aus der QTVR-Datei gelesen: hlookat, vlookat, fov,
fovmin,
fovmax, hlookatmin, hlookatmax, vlookatmin und
vlookatmax<view>-attribute
werden in qtkrparse.php vorbelegt:
fisheye="0", fisheyefovlink="0.5", limitfov="true",
camroll="0.0" limitview wird entsprechend der
min- und max-attribute
gesetzt: Wenn hlookatmin - hlookatmax = 360°
und vlookatmin -
vlookatmax = 180° (also die gesamte Sphäre sichtbar ist)
mit "lookat",
sonst mit "range".<view>-Attribute
können mittels
Parameter im Javascript-code überschrieben werden, z.B. um in
den
Genuß der Fisheye-Funktion von krpano zu kommen:qtkrparse.php
schreibt beim ersten Aufruf zwei oder drei Dateien in das
Verzeichnis in dem die QTVR-Datei liegt. Eine mit der Endung .xml, eine mit der Endung .ofs und ein optionales .jpg Vorschaubild. Die Namen aller
Dateien werden aus Namen und Endung der QTVR-Datei konstruiert.
Aus mein.mov wird z.B. mein_mov_kr.xml, mein_mov_kr.ofs.und mein_mov_prv.jpg. Bei allen folgenden
Aufrufen werden diese Dateien nur noch gelesen, es sei denn ihr
Dateidatum ist älter als das der QTVR-Datei oder von qtkrparse.php.
In diesem Falle werden die Dateien auch erzeugt. Das läßt
sich auch mit dem Parameter cache=reset
erzwingen, z.B.convert2.php ersetzt das <object>
und <embed> tag
von Quicktime durch einen entsprechenden Aufruf von SWFObject
mit krpano.swf.
QTVR-files for KRPanoqtkrparse.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 flash player with help from the krpano numbering and the offsets
file.
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 this directory.qtkrparse.php must be used with
the QTVR file as GET parameter "mov"
instead of the XML file by krpano.swf.
It is advisable to use SWFObject and javascript to do this, f.e.:For details on how to embed krpano please see: http://www.krpano.com/docu/html/qtkrparse.php uses a good deal of code from qtparser.php. See http://fieldofview.com/spv-dev/projects/qtparserqtkrparse.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>
and the <view> tag. All
other tags must be included through this file.<view>
attributes
are read from the QTVR file: hlookat, vlookat,
fov, fovmin,
fovmax, hlookatmin, hlookatmax, vlookatmin and vlookatmax<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".<view>
attributes can be overwritten in the SWFObjects javascript code, f.e. to know
the promise of the fisheye function of krpano: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.:convert2.php as a part of
the Birdcap-package
by Bernhard Vogl
. A version extended for qtkrparse is enclosed in the download. 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
apprpropriate call of SWFObject with
krpano.swf. You need SWFObject 1.5, of course. For details seeqtkrparse.php if you choose Flash als
fullscreen viewer. The calls are hidden behind some rewrite rules. But you can call the panoramas manually, too: