Retrieving citable binary data

Instantiate a IIIF service

Instantiate a service with a base URL and a path to the root directory for the service.

using CitableImage
baseurl = "http://www.homermultitext.org/iipsrv"
root = "/project/homer/pyramidal/deepzoom"
service = IIIFservice(baseurl, root)
IIIFservice("http://www.homermultitext.org/iipsrv", "/project/homer/pyramidal/deepzoom")

Compose an IIIF request

Compute a IIIF request for an image identified by URN.

using CitableObject
img = Cite2Urn("urn:cite2:hmt:vaimg.2017a:VA012RN_0013")

iifrequest = url(img, service)
"http://www.homermultitext.org/iipsrv?IIIF=/project/homer/pyramidal/deepzoom/hmt/vaimg/2017a/VA012RN_0013.tif/full/2000,/0/default.jpg"

Compose a markdown display of an image

Format the request for inclusion in a markdown document. Here, we'll use the optional height parameter to set the result image's size in pixels.

markdownImage(img, service; ht = 200)

Compose a markdown display linked to an image citation tool

We need an additional parameter for the ImageCitationTool to link to. In this exmaple, we'll opt to include both a height in pixels and a caption to embed in the markdown.

ict = "http://www.homermultitext.org/ict2/?"
linkedMarkdownImage(ict, img, service; ht=100, caption="folio 12 recto")

The output is linked to the configured image citation tool.

Compose an HTML display of an image

Format the request for inclusion in an HTML document. Here, we'll use the optional height parameter to set the result image's size in pixels.

htmlImage(img, service; ht = 200)
urn:cite2:hmt:vaimg.2017a:VA012RN_0013