Graphics::DZI::A4 - DeepZoom Image Pyramid Generation, specifically for documents
use Graphics::DZI::A4; $Graphics::DZI::log ->level ($loglevel); $Graphics::DZI::A4::log->level ($loglevel); my $dzi = new Graphics::DZI::A4 (A4s => \@images, overlap => $overlap, tilesize => $tilesize, path => './', prefix => 'xxx', 'format' => $format, ); use File::Slurp; write_file ('xxx.xml', $dzi->descriptor ); $dzi->iterate ();
This subclass of Graphics::DZI::Files is specifically though for images covering document pages. While it is named A4, this is mostly historical; as long as all your images have the same dimensions, this package should.
A4
The idea is that the whole document (the set of images) forms a large image, the individual images organized in a square fashion (1x1, 2x2, 4x4, ...). At the highest zoom level of course all pages will be visible. But if you zoom out, then not only the pages get smaller. Also the pages shown will be reduced, so that at the smallest zoom level only the first page is visible.
Other than the superclass Graphics::DZI::Files this class takes an array (reference) to a list of images.
A4s
Do not be fooled by the A4; any format should do.
This iterate honors the fact that we are dealing with a set of documents, not ONE large image.
Also the descriptor generation is a bit special.
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.
cpanm
cpanm Graphics::DZI
CPAN shell
perl -MCPAN -e shell install Graphics::DZI
For more information on module installation, please visit the detailed CPAN module installation guide.