Krpano not automatically detecting view settings

  • It has always been to my understanding --and some of my old prototypes seem to show this behaviour as well-- that Krpano is perfectly capable of determing view settings itself. In particular the properties 'fov', 'fovmax', 'vlookatmax' and 'vlookatmin'.

    My input image is a simple JPG of 1837x313 px. In those old prototypes Krpano is perfectly capable of initializing and limiting the view in such a way that one cannot look beyond the top or bottom edges of the image.

    Unfortunately, now I cannot for the life of me get it to work anymore. Here's me hoping some of the Krpano veterans can shed some light on the possible causes. We're using version 1.0.8.11 in both the implementation and the prototypes.

    The used XML is the following:

    Even when using the following barebones version it won't work. As such, I can't believe it's caused by anything in the global.xml or editor.xml files.

    XML
    <?xml version="1.0" encoding="UTF-8" ?>
    <krpano version="1.0.8">
    	<!-- Image Settings -->
    	<image type="sphere">
    		<sphere url="/_temp/360fotos/panoramas/temp/pano.jpg" />
    	</image>
    </krpano>

    The documentation as well as my prototype leads me to believe this should work. The default settings of view.hfov equals 360 which is correct for the input image. Since view.vfov is empty, this should be calculated based on the view.hfov and the input image's dimensions. Finally, automatic limiting for vlookatmin and vlookatmax should kick in.

    I tried a lot of settings related to limitrange and whatnot, but to no avail. If anyone could give some ideas what could possibly cause Krpano not to figure it out on its own, it'd be much appreciated. I am completely clueless right now.

    Unfortunately, I cannot provide much more code as we have a lot of code doing lots of things, nor can I give an online location as it is not released yet.

    Thanks in advance.

  • Hi jmulder,

    I think your code should work...
    As a try, I have modified the example krpano-1.0.8.12-2010-11-09\examples\supported-pano-formats\sphere ...
    I have cropped the pano.jpg from 1024x512 to 1024x300 and modified the sphere.xml to the simplest code:

    Code
    <krpano>
    	
    	<image type="SPHERE" >
    		<sphere url="pano.jpg" />
    	</image>
    
    
    </krpano>


    And the limits are correct...

    By default, the view.limitview is set to auto. Perhaps you sets it with an other value somewhere on your code???...

    Hope this help...

    SAlut.

  • michel, thanks for the quick reply, but I just solved it in 10 seconds.

    Very embarassed to admit it was caused by a cached version of the input image. Google Chrome caches anything loaded through Flash ruthless and never seemed to pick up on the changed JPG. Moving on. *wink*

    Edit: This does make me realize we'll have to seriously look at implementing proper expiration headers for the input images as well. Already doing this with the XML though.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!