Closed digitaldogsbody closed 1 year ago
Adding an Image onto a Canvas with the helper should produce an Annotation that targets the Canvas object.
The Annotation targets the URI of the image.
from iiif_prezi3 import Canvas c = Canvas() c.add_image(image_url="https://example.com/image.jpg") print(c.json(indent=2))
returns:
{ "@context": "http://iiif.io/api/presentation/3/context.json", "id": "http://example.org/iiif/1", "type": "Canvas", "items": [ { "id": "http://example.org/iiif/3", "type": "AnnotationPage", "items": [ { "id": "http://example.org/iiif/2", "type": "Annotation", "motivation": "painting", "body": { "id": "https://example.com/image.jpg", "type": "Image" }, "target": "https://example.com/image.jpg" } ] } ] }
https://github.com/iiif-prezi/iiif-prezi3/blob/main/iiif_prezi3/helpers/canvas_helpers.py#L22
Expected behaviour:
Adding an Image onto a Canvas with the helper should produce an Annotation that targets the Canvas object.
Observed behaviour:
The Annotation targets the URI of the image.
returns:
Potential bug location(s):
https://github.com/iiif-prezi/iiif-prezi3/blob/main/iiif_prezi3/helpers/canvas_helpers.py#L22
Any other comments: