DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:panoview

PanoView Plugin

Compatible with DokuWiki

  • 2013-12-08 "Binky" unknown
  • 2013-05-10 "Weatherwax" unknown
  • 2012-10-13 "Adora Belle" yes
  • 2012-01-25 "Angua" yes

plugin Display large images in a zoomable and pannable view

Last updated on
2012-12-04
Provides
Syntax
Repository
Source

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 download link given above. 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.

1) in rare race conditions you might see two processes
plugin/panoview.txt · Last modified: 2013/09/21 17:53 by Aleksandr