Dynamically set image.fisheye.crop

  • Hello,

    I'm trying to set image.fisheye.crop from inside of an action but it doesn't seem to affect the image. Calling set() and then tracing get() shows the updated crop value, but it doesn't affect the display of the image. For reference, here is a minimal XML reproduction of what I'm doing:

    A 1920x1080 video is being displayed on the fisheye image, and the crop on the fisheye is set at 2560x1440. The FOV is restricted to allow 180 horizontal panning but disallow vertical panning. As expected, there is some distortion and black background visible on the right edge when the crop dimensions are larger than the video dimensions. When the pano XML is loaded with an initial crop of the exact video dimensions (e.g. crop="0|1920|0|1080"), the result is a nice edge-to-edge video pano. There is an onlick action that attempts to crop the fisheye dynamically to the video dimensions, and trace its progress, which doesn't work. The log output shows the expected results, with the crop attribute changing:

    Code
    INFO: cropping image fisheye from: 0|2560|0|1440
    INFO: cropped image fisheye to: 0|1920|0|1080

    I was expecting for the display to update along with the crop attribute, but it doesn't. Should I be approaching this a different way? For further background information, I'm working on an adaptive streaming video player plugin for fisheye videos that needs the image crop to update when the video dimensions change. I'm using krpano 1.19-pr16.

Participate now!

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