Edit Translation
by Transposh - translation plugin for wordpress
Surfing in IPv4

DeepZoom, installing Graphics:DZI


There is a zoom format, Deepzoom which decomposes the original image into pieces, and allows zoom in on the image and very fluid with many options. For use in web takes a foul Seller JavaScript very clear and well documented Seadragon. Another adventure is to create different ddatos and images necessary to make the DZI (DeepZoomImage), he opted to install a module Perl that creates the necessary files to get an image DZI. Installing CPAN modules is always a bit mysterious and agrees, if you are not working on Perl very often, search installation methods that conform to the platform and version Perl that is being used, because the module could not be installed properly, or interfere with already installed.
Install Graphics::DZI with a VPS Debian Squeeze

Prerequisites: Perl5 higher installed, C compiler, access to a terminal with ssh, ImageMagick, perlmagick y libgraphics-magick-perl instalados. These things usually come default, but it does not hurt to find related packets apt, aptitude o Synaptic (if you've activated the X on the server and the client from which you connect).

Below I will briefly summarize the method of using the command shell cpan described here, is actually a pocedeimiento to install LiveJournal, but explains quite well the steps to successfully install CPAN modules.

Configure CPAN

or also

Update CPAN. From the console of CPAN (If the above step does not enters the CPAN console , simply use the command CPAN, and it leaves us in its "shell".

When it has finished with its stuff, enter:

Install the module

With this already be installed.

The library may be missing “moose”, it would be enough to install “libmoose-perl” from a package manager.

Testing Graphics::DZI

The creator has made a number of tickets for this module on your blog. It should be a directory anywhere that is convenient to us (p.ej. var / www / vhosts / undominio.cualquiera / httpdocs / seadragon / test) and copy or upload an image to test. Enter the following command

Directory appears (imagen-files) pictures with chapped for DeepZoom and imagen.xml file containing information relating to them. We can make a copy of imagen.xml in imagen.dzi, since it is then that we will use with Seadragon, be less confusing and change the names in the example.

Viewing the image with Seadragon

We can copy the contents of the Seadragon in directory of the same name. While giving the file exe download, this can be decompressed with any program. We should copy the files "sample.html" and "seadragon-dev.js" the directory where we test image. Done, edited sample.html to open our image (imagen.dzi) changing the line "viewer.openDzi("Logo.dzi");” por “viewer.openDzi(“imagen.dzi”);"Seadragon-dev.js and change" var PATH = "/ src /";” por “var PATH = “../src/”;.

The result is that. To make the buttons look good, just copy the img directory to test. There is a "seadragon-min.js" file that is the result of combining all. js one minimized, can be used instead del dev if you need a little more speed.

There is a module PHP to Deepzoom, but once installed, do not really know what makes. The truth is that there is no PHP.

Preparing to call modules Perl from PHP.

Since this blog is PHP, but the module is perl, should try that you can call Perl and control some variables, if we use the most convenient way Deepzom to try frame by frame, and then put them in the appropriate directories.

We can use two tactics, install a CPAN module, we would call PHP from Perl vice versa, or module PHP to call Perl. Describe the second option because the first I could not make it work yet.

The first is to have installed development libraries PHP and Perl, al compile error will give us. Using the following commands (write before south if the account is not root).

If he has not given errors go to step heavier. It turns out that the module is not updated in PECL, but for convenience is better download and unzip in a directory that hang from those of PHP files Perl-1.0.0.tgz. After copying over the directory update, los ficheroe package.xml, updated since Aquiel php_perl.h README gives the commands that must be run, or this link also worth. This one gives some good clues. Basically the commands are:

Finally we should activate the module installed in php.ini by adding the line "extension =" where put some "Dynamic extensions". On a Plesk server, which is where I've had these things, there is a php.ini in "var / www / undominio.cualquiera / etc", and the block "[PHP]"The above line is added at the end. And the apache restarts, via ssh or the Plesk panel(tools & Settings/ Services management).

To verify the installation and know where it could be setup php we need, the code described here would give us all the information we need from php. Should appear something like this:

In the next installment, how to operate everything without plugin, but from ssh.

As a warning, php_perl version is evolving and it may be quite unstable.


Deep Zoom and perl:


CPAN page

4 comments to DeepZoom, installing Graphics:DZI

Leave a Reply