PanoView Plugin

panoview plugin by Andreas Gohr
Display large images in a zoomable and pannable view

Last updated on 2009-07-31. Provides Syntax.
Compatible with DokuWiki devel 2009-06-09+.

Similar to panorama.

Tagged with images, javascript, media, panorama.

    panoview in action This plugin lets you display very large images, like panorama or medical images, in a user friendly way. The image is shown in a view pane that only loads the currently visible part of an image. To do that the image is sliced into several smaller tiles. The image can be dragged and zoomed similar to Google Maps.

    The slicing is done on the fly when new tiles are requested, no preprocessing of your images is needed.

    The plugin uses a modified version of PanoJS JavaScript library.

    Download and Installation

    Download and install the plugin using the Plugin Manager using the following URL. Refer to Plugins on how to install plugins manually.

    Changes

    Syntax and Usage

    The usage is similar to the image syntax, just prefix your image with panoview> and give the size of the wanted viewport. E.g.:

    {{panoview>hawaii:megapanorama.jpg?500x200}}

    You can align the image using spaces (center is default). This would right align:

    {{panoview> hawaii:megapanorama.jpg?500x200}}

    And this left aligns:

    {{panoview>hawaii:megapanorama.jpg?500x200 }}

    The initial zoom value defaults to 1 (higher number is deeper zoomed in). You can set by prefixing the wanted value by Z and add it to the parameters by an &:

      {{panoview>hawaii:megapanorama.jpg?500x200&Z5}}

    The image can be dragged with the mouse. Zooming is done with the +/- controls in the lower right corner.

    Important Notes

    Working with large images needs a lot of memory. The plugin can use the GD library, but is then limited to the PHP memory limit set in php.ini. It is highly recommended to use ImageMagick via the im_convert option instead.

    Creating the tiles happens on the fly, panning an image for the first time will probably be very slow. But the tiles are cached, so subsequent views are much faster.

    The plugin creates different tiles for each zoom level. They do take a lot of space, be sure you have enough.

    Creating tiles can be very CPU heavy. When you view a image for the first time, multiple tiles will be requested at once. Each request will trigger the image processing.

    To avoid bringing your server to a complete halt, the tiling generator creates a lock file. This means only one tile is generated at the same time1) but also slows down the initial slicing. Cached tiles are delivered immediately without locking.

    To lower the CPU impact when running the plugin with Image Magick, a path to the nice utility should be specified in the config manager. This way the tile generator has lower priority than all your other webserver tasks.

    I haven't tested this on Internet Explorer, yet. It might be broken - let me know if it works or not.

    If you don't get any output then the tile generation is probably broken (most probably a memory problem, see above). To debug call a tile URL manually and check for any errors. E.g. http://yourserver/lib/plugins/panoview/tiles.php?tile=2-0-0&image=namespace:image.jpg

    Demo

    Here's the plugin in action. Add your own site if you use it.

    Confused

    According to http://forum.dokuwiki.org/thread/3883 this plugin requires the snapshot version of DokuWiki and the documentation was to be updated ??? peterennis [at] yahoo [dot] com

    If it can be used in the latest stable I will test it.


    1) in rare race conditions you might see two processes
     
    plugin/panoview.txt · Last modified: 2009/10/07 17:14 by laynee
     
    Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
    Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
    WikiForumIRCBugsGitXRefTranslate