Sharp: Support for Level 0 IIIF Image API?

Created on 14 Aug 2018  Â·  4Comments  Â·  Source: lovell/sharp

Hi,

I'm working on a nodejs library for generating IIIF manifests/collections:

https://github.com/edsilv/biiif

Right now you need to generate image tiles using a python script:

https://github.com/edsilv/biiif#image-services

It would be nice to be able to use nodejs (specifically Sharp) to generate the tiles, but it looks like only the dzi format is currently supported. It's possible to use dzi in an image service like this:

https://gist.github.com/tomcrane/34180dc6c5c1caf7e244ffd12e64c389#what-about-the-infojson-what-about-an-av-api

But I expect that the IIIF community will prefer to use the format that they are accustomed to.

I was wondering if you had any plans to support the Level 0 IIIF Image API in the tile method?

enhancement ready-to-ship

Most helpful comment

The future libvips v8.9.0 will have this - see https://github.com/libvips/libvips/issues/1465

The layout parameter of tile() will need extending to also accept iiif as a possible value.

https://sharp.pixelplumbing.com/en/stable/api-output/#tile

All 4 comments

Hello, tile is a wrapper around vips_dzsave.

Please see http://jcupitt.github.io/libvips/API/current/Making-image-pyramids.md.html and http://jcupitt.github.io/libvips/API/current/VipsForeignSave.html#vips-dzsave for details of what it currently supports.

It would make most sense to add support for the IIIF directory layout in libvips itself. https://github.com/aaronland/go-iiif/issues/20#issuecomment-409675639 is relevant here.

The future libvips v8.9.0 will have this - see https://github.com/libvips/libvips/issues/1465

The layout parameter of tile() will need extending to also accept iiif as a possible value.

https://sharp.pixelplumbing.com/en/stable/api-output/#tile

FWIW – and I'm not sure this is the right place to mention it, but here goes – I've written a fast, lightweight HTTP wrapper for sharp that implements the IIIF 2.1 spec. Realtime extraction of tiles and regions of interest along with IIIF's custom cropping, rotation, and color options. Works best with pyramid TIFF source images, but it's compatible with any image format libvips can read. https://github.com/nulib/node-iiif

v0.25.2 is now available with IIIF support, thanks again for the PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhump picture zhump  Â·  3Comments

genifycom picture genifycom  Â·  3Comments

AVVS picture AVVS  Â·  3Comments

zilions picture zilions  Â·  3Comments

iq-dot picture iq-dot  Â·  3Comments