Skip to content

Deepzoom Tile Generator for OpenSeadragon

Notifications You must be signed in to change notification settings

hannesherold/deepzoom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deepzoom

This is a modified fork of jeremytubbs/deepzoom, a tile Generator for use with OpenSeadragon.
It supports automatic watermark insertion.

Basic watermark support

To automatically add a watermark image to tiles, we use the insert() method of the Intervention Image library.
Users can specify the image-file and the zoom-level from which on the watermark should be applied.
This alpha version was tested with imagick image library only.

Example implementation

   require_once __DIR__ . '/vendor/autoload.php';

   $options = [
      'path'           => 'tiles',
      'format'         => 'jpg',
      'watermarkFile'  => 'watermark.png',
      'watermarkLevel' => 10,
   ];
   $source = 'images/test.jpg';
   $folder = null;
   $file = null;

   // Setup Deepzoom
   $deepzoom = Hherold\Deepzoom\DeepzoomFactory::create($options);

   // folder, file are optional and will default to filename
   $response = $deepzoom->makeTiles($source, $folder, $file);

path
The export path for tiles.
required

format
The export format for tiles. Watermark support was only tested with jpg files.
Default: jpg

watermarkFile
If you want the module to automatically add a watermark to the tiles, specify the file here. Transparent PNG works best.
Default: null

watermarkLevel
Specify from which zoom-level on the watermark should be applied.
Default: 10

Supported Image Libraries

Originally Deepzoom supports Imagick and gd. This module however is only tested with Imagick (>=6.5.7), which is therefore set default.

FYI:

Filenames for JSONP must not start with a number and should not contain hyphen therefore filename spaces and hyphens will be converted to underscores. Folder name spaces will be converted to hyphens. If you would like to avoid this auto-naming declare your 'folder' and 'file' within the maketiles method.

License

MIT

About

Deepzoom Tile Generator for OpenSeadragon

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%