A sample and quite dumb web server to serve pictures following the iiif API.
Image API Compliance Level 2 is reached.
libvips is required by bimg.
$ go get -u \ github.com/gorilla/mux \ gopkg.in/h2non/bimg.v1 \ github.com/golang/lint/golint $ go build -o bin/iiif $ bin/iiif --help $ bin/iiif --host 0.0.0.0 --port 8080 --root images
IIIF image API 2.1
The API specifications can be found on iiif.io.
filename: the name of the file (all the images are in one folder)
full: the full image
square: a square area in the picture (centered)
x,y,w,h: extract the specified region (as pixels)
pct:x,y,w,h: extract the specified region (as percentages)
full: the full image (deprecated)
max: the full image
w,h: a potentially deformed image of
w x h
!w,h: a non-deformed image of maximum
w x h
w,: a non-deformed image with
was the width
,h: a non-deformed image with
has the height
pct:n: a non-deformed image scaled by
na clockwise rotation of
!na flip is done before the rotation
limitations bimg only supports rotations that are multiples of 90.
colorimage in full colour
grayimage in grayscale
bitonalimage in either black or white pixels (not supported)
defaultimage returned in the server default quality
limitations : bimg (libvips) doesn't support writing to
It provides all informations but the available
sizes information would be much better linked with a Cache system.
It provides meta-informations about the service. (incomplete)
Some viewers are supporting the iiif API quiet out of the box, a good way to test some aspects of the API.
- Caching (reading from the disk)
- Caching (produced assets)