Show a single static image #1
Replies: 3 comments 9 replies
-
I have a question on this one. Is it always desirable that only a single image is used – maybe from the "sizes" property in an image service, especially if a thumbnail service is used. Or should it, from a developers point of view, work as if it were a single image? So to use it, something like this if it was a web component
But under the hood it might decide to position 6 256x256 tiles. So I guess the question is, should the developer care which approach is used and should they have any control over it? |
Beta Was this translation helpful? Give feedback.
-
For all the "show image" use cases... Problem... I have some resource and I want to use it to render an image. different props:
or
where the If the value of the prop is a content state, the component needs to evaluate it (is it an encoded anno? Is it a fetched content state?) and process - wouldn't need the |
Beta Was this translation helpful? Give feedback.
-
Running with this for the time being, and trying to summarise the above discussion. Keeping However, the tags share a number of attributes. For most canvases in the world, that have one image for the whole canvas, the default rendered output is the same. A // template developer knows they have an image service
// this tag behaves like an <img /> tag. It can only be an image!
<img-service src="http://..." render="static" />
// template developer has a canvas id within a manifest
<canvas-panel
render="static"
iiif-content="https://..canvas_id.."
partof="https://..manifest_id.."
</canvas-panel>
// template developer has a canvas within a manifest expressed as a content state (partof is provided by the content state)
<canvas-panel
render="static"
iiif-content="..content_state.."
</canvas-panel>
// programmatically
<img-service id="im1" />
<script>
document.getElementById("im1").src = "https://..image-service..";
im.setAttribute("render", "static"); // what does it mean to do this after setting `src`?
</script>
<canvas-panel id="cp"></canvas-panel>
<script>
const vault = new Vault();
const cp = document.getElementById("cp");
cp.setAttribute("render", "static");
// cp.render = "static"; // ??? can you do this too?
await vault.loadManifest("..manifest_id..");
cp.setCanvas("..canvas_id..");
</script> What events, attributes and properties are shared by If the image service is version 3, and if it supplies a preferredFormats property, both tags will use the preferred format(s). The user can also set a preferred format manually:
If this format is not available the tag will fall back to the default jpg. |
Beta Was this translation helpful? Give feedback.
-
Given a IIIF Image Service, I want to render the
/full/
image at a particular size, as a static image.As if I had just used an
img
tag.I might want to constrain by width, by height, or by both.
I might want the component to select an appropriate source image that might not exactly match the size I specified. I want to control this behaviour.
I might want the component to select a higher resolution source than my constrained dimension(s) so that it looks good on retina displays (the w,h of the pixel sources might be different from
<img style="width: 100px" />
).Given a IIIF Canvas, I want to render the Canvas as a single image in the same way.
In this case, the 99.99% path would be to observe that the Canvas only has one image and targets the whole Canvas, so the behaviour and impl is the same as above - just take that image service.
But the 0.0..01% case will require image composition.
Accessibility considerations
I should be able to tell the component to use the label it finds on the Canvas (with
aria-label
etc) or on the (v3) image serviceI should be able to provide alternative or additional strings
I should be able to control what IIIF-sourced properties are used for what
alt
,title
,aria-label
properties, overriding the sensible default behaviour, including not asserting an accessibility property if there is reason not to.Beta Was this translation helpful? Give feedback.
All reactions