翻译: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 中查看

  1. {
  2. "@context": "http://iiif.io/api/presentation/3/context.json",
  3. "id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/manifest.json ",
  4. "type": "Manifest",
  5. "label": {
  6. "en": [
  7. "Playbill Cover with Manifest Thumbnail"
  8. ]
  9. },
  10. "summary": {
  11. "en": [
  12. "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."
  13. ]
  14. },
  15. "thumbnail": [
  16. {
  17. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001/full/max/0/default.jpg",
  18. "type": "Image",
  19. "format": "image/jpeg",
  20. "height": 300,
  21. "width": 219,
  22. "service": [
  23. {
  24. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001",
  25. "type": "ImageService3",
  26. "profile": "level1",
  27. "extraFormats": [
  28. "jpg",
  29. "png"
  30. ],
  31. "extraQualities": [
  32. "default",
  33. "color",
  34. "gray"
  35. ],
  36. "protocol": "http://iiif.io/api/image",
  37. "tiles": [
  38. {
  39. "height": 512,
  40. "scaleFactors": [
  41. 1,
  42. 2,
  43. 4,
  44. 8
  45. ],
  46. "width": 512
  47. }
  48. ]
  49. }
  50. ]
  51. }
  52. ],
  53. "items": [
  54. {
  55. "id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/canvas/p0",
  56. "type": "Canvas",
  57. "label": {
  58. "en": [
  59. "front cover with color bar"
  60. ]
  61. },
  62. "width": 4520,
  63. "height": 5312,
  64. "items": [
  65. {
  66. "id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/page/p0/1",
  67. "type": "AnnotationPage",
  68. "items": [
  69. {
  70. "id": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/annotation/p0000-image",
  71. "type": "Annotation",
  72. "motivation": "painting",
  73. "body": {
  74. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001_full/full/max/0/default.jpg",
  75. "type": "Image",
  76. "format": "image/jpeg",
  77. "height": 5312,
  78. "width": 4520,
  79. "service": [
  80. {
  81. "id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001_full",
  82. "type": "ImageService3",
  83. "profile": "level1"
  84. }
  85. ]
  86. },
  87. "target": "https://iiif.io/api/cookbook/recipe/0117-add-image-thumbnail/canvas/p0"
  88. }
  89. ]
  90. }
  91. ]
  92. }
  93. ]
  94. }

相关专题