Examples
|
|
Examples
|
|
Examples
|
|

This website has been constructed using three open source packages which are available at https://github.com/britishlibrary. We refer to these collectively as “Sanddragon” recognising that the viewer packages were derived from the Open Seadragon zoom & pan viewer. The packages are:

  • The Sanddragon Image Service is a WCF (Windows Communication Foundation) web sevice.
  • The Sanddragon Widget is a zoom and pan viewer for a single image, where the widget can be embedded within a navigation control.
  • The Sanddragon Item Viewer navigation control extends the functionality of the Widget to view multiple images, as a book or manuscript viewer.

Select an appropriate tab for more information on each package.

All three packages comply with the IIIF standard for delivering tiles images, and so can support zoom and pan viewing from a JPEG 2000 image file.

Here are examples image tiles produced by the Image Service, where relevant IIIF parameters are displayed under each image. For an explanation of the parameters see the IIIF API.

Thumbnail of Cotton MS Claudius b iv
/full/100,/0/native.jpg
Percentage region part of a Royal manuscript
/pct:33,20,40,70/100,/0/native.jpg
Pixel region of a Dublin map showing the Temple bar area
/2155,1630,100,100/100,/0/native.jpg
90 degrees right rotated part of a London And Westminster map.
/pct:55,45,8,8/200,/90/native.jpg
(in this image we specify 200 wide but get 200 high because we have rotated the image by 90 degrees)
Or.13822 Yuriwaka Daijin [The Tale of Minister Yuriwaka].
/pct:14,50,20,30/100,100/0/native.jpg
(this image is distorted to be square 100 x 100)
Or. 12439 Benkei monogatari [Tale of Benkei].
/pct:15,40,65,28/275,/0/native.jpg

The Sanddragon Image Service is a WCF (Windows Communication Foundation) web service which implements the IIIF image API, deployed on Microsoft's IIS (Internet Information Server). By using this web service it is possible to show a static, i.e. non zoomable and non pannable image. This could be, for example, useful to show thumbnails of a large image or to show only the part of an image which is of interest.

The Sanddragon Image Service uses a Kakadu component to extract image information from a JPEG 2000 file. The kdu_expand.exe component which is freely available from http://www.kakadusoftware.com/ . For improved performance it is possible to purchase a licence from Kakadu Software to download source packages which will allow you to build a Kakadu dll.

As kdu_expand.exe is not able to generate image tiles which are browser compatible (eg gif, jpg, png), it generates bmp image tiles and by using the image conversion libraries available in the .Net libraries the image service loads the bmp and creates browser compatible jpg image tiles.

The Sanddragon Widget is an image viewer that is based upon Open Seadragon which has been modified to work with an IIIF server, such as the Sanddragon Image Service. The term widget emphasises that it is normally embedded within an item navigation control, although it can also be used on its own if the intention is just to show a single zoomable and pannable image. The Sanddragon Widget uses an IIIF server, such as the Sanddragon Image Service to retrieve image tiles from a JPEG 2000 image file through the use of the IIIF API.

The IIIF Sanddragon widget is derived principally from OpenSeadragon (see http://openseadragon.codeplex.com/) where several aspects are relevant:

  • A request for a static image tile from a DZI (Deep Zoom Imaging) folder was changed to a request for a dynamically created image tile using the IIIF Image API.
  • To minimise blurring in a displayed image it is important to minimise the number of times an image is resized from the source image through to the display in the viewer.
  • The viewer thus requests an image tile of a size and resolution that can be produced by a server from a JPEG 2000 source file without the server having to resize the tile before delivering it.
  • The viewer thus first requests technical information about the image, such as width, height and the number of resolution levels in the JPEG 2000 source image.
  • It then adapts the size of its own image tiles to align with those that can be efficiently served without resizing on the server – these are in powers of 2 reductions from the source image. For example, with a 1024 x 512 source image with 5 resolution levels, the smallest thumbnail that can be efficiently produced is 64 x 32 using 4 reduction levels.

Features available:

  1. Zoom and pan around the image, using the mouse, mouse wheel and icons.
  2. Full screen mode of the image will create a new window expanding to full screen.
  3. Reset will reset the image to its original view.
  4. Rotation of 90, 180, 270 degrees at the zoom and position on the image.
  5. A zoom overview panel (ZOP) to indicate where you are when zoomed into an image.
  6. The red rectangle in the ZOP can also be dragged around thus speeding up navigation around an image.

The following additional components were also used in developing the Sanddragon widget:

  1. drag.js from http://www.dynamicdrive.com (licence http://www.dynamicdrive.com/notice.htm )
  2. fade.js from http://www.switchonthecode.com/tutorials/javascript-tutorial-simple-fade-animation
  3. spin.js from http://fgnass.github.com/spin.js#v1.2.3

Access the source code for the Sanddragon Widget here - https://github.com/britishlibrary/SanddragonWidget

Here are examples of thumbnail images produced by the Image Service.
Click on one of the images to launch the Item Viewer

The Sanddragon Item Viewer is an item navigation control, as such it enables navigation between a set of images working with the Sanddragon widget. The Sanddragon Item Viewer can therefore be used as a book or manuscript viewer.

This release of the Sanddragon Item Viewer allows you to:

  • Navigate between images using the navigation bar at the bottom of the viewer.
  • Open up a double view using the open book icon to simulate an 'open book view'. This assumes that the 1st image is a front cover and so initially only one image is shown.
  • Show a thumbnail preview of that image by holding down the slider when selecting a view. And,
  • View the item metadata and drag it to an area that does not obscure the image.

In addition to embedding the Sanddragon Widget in an iframe, the Sanddragon Item Viewer uses the following components:

  1. drag.js from http://www.dynamicdrive.com (licence http://www.dynamicdrive.com/notice.htm )
  2. fade.js from http://www.switchonthecode.com/tutorials/javascript-tutorial-simple-fade-animation
  3. dragresize.js from http://www.pagecolumn.com/javascript/drag_resize.htm
  4. prototype.js from http://prototype.conio.net/
  5. slider.js from http://script.aculo.us/

The IIIF (international image interoperability framework) is a collaboration between academic institutions and national libraries. See http://lib.stanford.edu/iiif/ for more information. IIIF is defining a series of standard interfaces whereby an IIIF compatible viewer application can interact with an organisation’s IIIF compatible server infrastructure. A goal is for an organisation to be able readily to deploy such a viewer with its own digitised resources. It will also be possible for resources to be accessed at different organisations that provide IIIF compatible server infrastructure.

 

The British Library makes the Sanddragon packages available under the following licencing.

  • All source code created by the British Library is published under the terms of the BSD-3 licence.
  • All licenced code created by third parties (whether subsequently modified by the British Library or not) is published under the terms of the original licence.
  • All code created by third parties that does not specify a licence (whether subsequently modified by the British Library or not) is published without stipulating a licence and the original source repository is identified.

The British Library's BSD-3 Licence is shown below -

Copyright (c) 2012, The British Library Board
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of The British Library nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.