Running krpanotools via a script

  • Hi

    I am in the process of upgrading a web site which uses an old version of krpano to the latest 1.17 version, mainly in order to move across to the HTML5 viewer so that the site works on iOS/Android etc.

    Panoramas on this site are uploaded by users all over the world and the old krpano code was called directly from PHP to generate the tiles from their uploads. This worked fine. However, some of the panoramas on the site are not using a width/height ratio that 1.17 seems very happy to work with. The krpanotools makepano call stops and asks for the panorama type and hfov values. Specifying these directly on the command call doesn't work. The result is that, for these types of panorama, the PHP-based upload system appears to lock up as krpanotools is directly asking for user input. Is there any way to circumvent this?

    Here's an example run using a panorama that has a very high width to height ratio (around 22:1):

    krpanotools makepano -config=multires.config -panotype=cylindrical -hfov=360 '2213.jpg'

    kmakemultires 1.17 - 64bit (build 2014-04-03)
    - using config: multires.config

    Output: Flash=yes HTML5=yes

    WARNING: 2213.jpg is not a 360x180 panorama image!
    Imagesize=12690x554px

    Type of the panorama image? (0=None/Skip, 1=Flat, 2=Spherical, 3=Cylindrical)
    Input: 3
    Horizontal Field of View? (0-360): 360


    I have also tried specifying partialcylinder instead of cylinder but that doesn't make any difference.

    Thanks
    David

  • OK, have figured this one out myself - I needed to use the PHP proc_XXX calls to "pipe" the extra parameters into the krpanotools makepano script.

    However, that still doesn't explain why I needed to do this and why krpanotools makepan is ignoring the parameters sent to it in the first place!

    David

  • I am in a similar boat. I'm calling php exec() and am getting an empty array for my $output variable and the $return_var is showing 5. Could you post your code here to show me your workaround using proc_xxx()?

    Here is what my exec code looks like

    Code
    exec('/Users/xxx/Sites/xxx/sites/all/libraries/krpano/krpanotools makepano -config=/Users/xxx/Sites/xxx/sites/all/libraries/krpano/pacificvtour.config /Users/xxx/Sites/xxx/sites/default/files/pan/IMG_6362mls-_2.jpg', $output, $return_var);  echo "OUTPUT "; print_r($output);
       echo "return "; print_r($return_var);
  • PVT

    Here you go:

    David

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!