翻译:Wu Gang
原文地址:https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/
专题主页 | 专题列表
用例
您有一本小册子的图像,并且想要选择一个图像作为整个对象的单一表示以供消费客户端使用。 这些客户端的范围从对象查看器(如 Mirador 或 Universal Viewer)到发现服务和其他聚合器(如 Spotlight 或自主开发的解决方案)。如果没有 Manifest(清单)声明的缩略图,一些客户端将从 Manifest 中的第一个 Canvas(画布)创建一个缩略图。
实施说明
缩略图可以允许非人类的接口使用您的清单来呈现内容的表示,以便人类读者快速理解。 例如,这可能出现在跨机构的目录网站中。
强烈推荐在 Collection(集合)和 Manifest(清单)中使用缩略图,并允许在 Canvas(画布)、内容资源和其他资源类型上使用缩略图。符合标准的客户端不需要呈现任何缩略图,但强烈建议在 Collection、Manifest、Canvas 和内容资源存在时进行缩略图呈现。当所有其他资源类型存在缩略图时,也允许客户端呈现缩略图。 每个资源可能包含多个缩略图,每个缩略图可以(但不要求)与其包含的资源具有相同的类型和格式。
存在多种方法来描述清单中的缩略图。对于一个Manifest,最有意义的做法是将全尺寸图像 URI 与包含整个 IIIF 图像服务 JSON 的 IIIF 图像服务结合使用。使用 Manifest 缩略图的客户端将会有不可预知的尺寸要求;复制完整的服务 JSON 为他们提供了最大的灵活性,并在快速有效地显示您的对象的缩略图方面取得了最佳效果。
限制
示例
本示例使用与观看方向及其对导航的影响专题中相同的歌舞伎表演节目的封面图像。但是,该图像具有色彩条,并且 Manifest(清单)包含 Manifest 的显式缩略图属性。在此特定的用例中,为了避免出现带有颜色校准条的缩略图,您可以选择从完全不同的图像中声明缩略图。在 Mirador 中,作为本文中使用的唯一查看器,Manifest 缩略图只在站点访问者使用“Add a resource”来更改已加载或活动的 Manifest 时显示。
JSON-LD | 在 Mirador 中查看
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/manifest.json ",
"type": "Manifest",
"label": {
"en": [
"Playbill Cover with Manifest Thumbnail"
]
},
"summary": {
"en": [
"Cover of playbill for \"Akiba gongen kaisen-banashi,\" \"Futatsu chōchō kuruwa nikki\" and \"Godairiki koi no fūjime\" performed at the Chikugo Theater in Osaka from the fifth month of Kaei 2 (May, 1849); main actors: Gadō Kataoka II, Ebizō Ichikawa VI, Kitō Sawamura II, Daigorō Mimasu IV and Karoku Nakamura I; on front cover: producer Mominosuke Ichikawa's crest."
]
},
"thumbnail": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 300,
"width": 219,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001",
"type": "ImageService3",
"profile": "level1",
"extraFormats": [
"jpg",
"png"
],
"extraQualities": [
"default",
"color",
"gray"
],
"protocol": "http://iiif.io/api/image",
"tiles": [
{
"height": 512,
"scaleFactors": [
1,
2,
4,
8
],
"width": 512
}
]
}
]
}
],
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/canvas/p0",
"type": "Canvas",
"label": {
"en": [
"front cover with color bar"
]
},
"width": 4520,
"height": 5312,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/page/p0/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/annotation/p0000-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001_full/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 5312,
"width": 4520,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001_full",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/canvas/p0"
}
]
}
]
}
]
}
相关专题
- 通过 IIIF 图像服务基本用法支持深度查看
- [实施说明 — 缩略图选择算法][0012]