Graphics::DZI::Document - DeepZoom Image Pyramid, Sparse Document Images
# prepare a bunch of Image::Magick objects
@pages = ......;
# create the overlay itself
my $o = new Graphics::DZI::Document (pages => \@pages,
x => 80000, 'y' => 40000,
pack => 'linear',
squeeze => 256);
# use the Graphics::DZI::Files and add this as overlay
This subclass of Graphics::DZI::Overlay handles documents as overlays for extremely sparse DeepZoom images. Documents here are also images, but not a single one, but one for each document page.
What is also different from a normal overlay image is that document overlays will show a different number of images, depending on the zoom level. First, when the canvas is the dominant feature, only a small first page is show. Whenever that first page is fairly readable, the first 4 pages are shown in the slot. Then the next 9 or 16, depending on whether the growth is linear or exponential.
Different to the superclass not the image, but a sequence of pages have to be passed in. Optionally, a parameter pack determines between linear and exponential growth of pages at higher resolutions. With linear you actually get 1, 4, 9, 16, 25... documents (so it is actually squared linear). With exponential you get more aggressively 1, 4, 16, 32, ... pages.
This will be called by the overall DZI algorithm whenever this overlay is to be size-reduced by 2.
Robert Barta, <drrho at cpan.org>
<drrho at cpan.org>
Copyright 2010 Robert Barta, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Graphics::DZI, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.