NationalMuseumAustralia / Collection-API

The public web API of the National Museum of Australia
11 stars 0 forks source link

Multiple versions of the same image and labelling of the images #3

Closed f27wood closed 6 years ago

f27wood commented 6 years ago

At the moment, object records with an associated image have a number of versions of the same image.

This will be addressed in the MVP, with each image having up to three versions only as follows.

thumbnail image A maximum width or height of 200 pixels

preview image A maximum width or height of 640 or 800 pixels

web image A maximum width or height of 1,600 pixels

The internal API will have one additional image version, with a maximum width or height of 2,000 pixels, to be labelled as 'full image'. TBC.

f27wood commented 6 years ago

Also note that the MVP will only include EMU images only when no Piction image exists.

staplegun commented 6 years ago

Outstanding issues:

staplegun commented 6 years ago

Also need to separate out the comma-delimited list of parent EMu objects. The initial attempt using tokenize() needs fixing.

Conal-Tuohy commented 6 years ago

did you want me to look at it? or is that just a note to self?

staplegun commented 6 years ago

ERROR: file:/usr/local/NMA-API-ETL/piction-to-rdf.xsl:47:10:err:XPTY0004:A sequence of more than one item is not allowed as the first argument of fn:tokenize() ("31190", "31190")

Fix. Changed from <xsl:for-each select="tokenize( $related-objects, '[,\s?]+' )">

To <xsl:for-each select="$related-objects!tokenize(., '[,\s?]+')">

staplegun commented 6 years ago

Fixed in https://github.com/NationalMuseumAustralia/Collection-API-ETL/commit/e582e70aa4bb55a8871a6292ae1800310a90b736

f27wood commented 6 years ago

For doco, image versions for the public API are labelled:

thumbnail image A maximum width or height of 200 pixels

preview image A maximum width or height of 640 or 800 pixels

large image A maximum width or height of 1,600 pixels

f27wood commented 6 years ago

Still need to test in internal API

f27wood commented 6 years ago

I'm not sure how to test that the additional image is in the internal API. I thought Phar lap's heart would have an original_2 image, but I cannot see a "full image" when I go to:

http://nma-dev.conaltuohy.com/object/64620&apikey=2N19hAqFEXaHWGUpdHszUmDMXA2zQLEG

But not sure if this is because there is no original_2 image, or not.

Moving to blocked as I am not sure how to test this.

staplegun commented 6 years ago

Comparing Piction XML for media MA23064154 (for object 64620), against internal API output in https://data.nma.gov.au/media/MA23064154?apikey=XXX