Closed jpstroop closed 9 years ago
Some follow up thoughts:
x,y
in the region be assumed to be 0,0
?/0,0,{min(width,height)},{min(width,height)}/
/0,0,s,s/
? /square/
?I think that the sensible default (as done by photo printing companies) is to distribute the crop evenly between the two ends of the long side
... but probably we should have the discussion in IIIF-Discuss first...
If 0,0 can be assumed, why not just use CSS (suggested by @sdellis):
Why can't the client request info.json? -1 to inventing URI patterns that all servers need to implement for a few clients in specific situations. Use case description would be helpful (though I guess it was discussed on the call, which I missed)
+1 to using CSS with overflow:hidden as per @jpstroop's example.
I tend to agree, but can also sympathize with the use case of wanting to create a big page of thumbnails without having to check the info for each one, and then load them separately.
That's what !300,300 is for.
Right, but I think the idea is to always fill out the whole square, AND to preserve visibility of the entire short dimension. Which you actually can't do with my CSS approach either.
(potentially cropping off some of the long dimension)
Scrolls will break any pattern regardless -- a 300x300 of a 1000x45000 scroll isn't going to be as useful as something that shows it's a scroll.
How did the client find the identifier for the image? From a manifest that could include a thumbnail link, thereby solving the problem?
Funny...was making the scroll point here at exactly the same time :smile:
It seems that they key question is whether such a thumbnail facility is justified outside of the link-came-from-manifest case
And not only any thumbnail, which we already have, but a square thumbnail that preserves the aspect ratio without having to retrieve the info.json. Perhaps we take the current solutions (above) to iiif-discuss?
+1. I can send.
A one liner of javascript to do it: http://www.fredparke.com/blog/cropping-images-using-simple-css-and-js Or from stack overflow: http://stackoverflow.com/questions/16891467/how-to-calculate-whether-an-image-is-landscape-or-portrait
You need to get a big enough image that you can be confident the shorter size will be your intended thumbnail size... which could be tricky for scrolls, for example, but 3:1 probably works for 99% of images
This seems like a fruitless path to travel as a service with no knowledge of its content. It is nearly trivial for a developer to use CSS to control this sort of small tile layout and the developer of a specific application will know better which piece of the image is most relevant (top center for a statuette, center center for a coin, top left for a manuscript). Here's a fiddle showing the squares in comparison. Background-size is useful and has both 'cover' and 'contain'. The latter may be more helpful to visualize scrolls, for example.
The biggest problem in getting the best quality thumbnail (though not breaking) is that the current spec allows for asking for a long side ,200
or a less than ,!200
, but you must know whether w
or h
is needed. A solution that may have other applications is for a parameter that applies to either h
or w
. Perhaps without the "," this would work.
I suggest syntax w,h!
which would probably fit to the existing standard most.
My arguments and real-life examples of use are in the iiif-discuss mailing list. CSS-only solution with existing IIIF Image API cannot guarantee pixel density of the thumbnail. JavaScript calculation of URL for every thumbnail on page from known width + height is not efficient. Server side calculation often impossible.
Update: ~w,h
is better - as discussed in mailing list
This seems like it also might be a use case for tiling where a specific w,h
is expected to be returned. It doesn't seem like there is a way to get a tile with an explicit width and height if it is at the edge of an image.
Discussion on IIIF Discuss call:
This ticket is suggesting to:
Extend the Region (http://iiif.io/api/image/2.0/#region) paragraph of the Image API with:
Form | Description |
---|---|
square |
Return a square image that preserves the short edge of the content. The square is centered at a point of the server's choosing. |
The alternative approach changing Size via ~w,h
is described at: https://github.com/IIIF/iiif.io/issues/450
Slightly different wording, but the same idea: http://image-auth.iiif.io/api/image/2.1/#region
Tech meeting @ GW approves. What level of compliance?
I propose required at level 2.
I'm torn between level 1 and level 2. Perhaps required at level 2 for now with the option to reconsider later if this turns out to be widely used.
Making it anything other than optional is a breaking change. I'm OK w/ level 1 in 3.0.0
Hrm. I guess this is the trouble with only having MUST at different levels and not SHOULD.
Perhaps we can clarify our interpretation of semver a bit. We're not breaking anything backwards ... everything that you could do in 2.0 is the same in 2.1, you just have another requirement that 2.1 servers MUST support at level x compliance. So I don't think it's a breaking change, as everything is backwards compatible ... just not forwards compatible in that a 2.0 server will not fulfill all of the requirements that a 2.1 server has.
We could annotate new requirements in the compliance doc as to which version they were introduced at.
@azaroth42 - yes, this is the way I like to think about what a breaking change is: In going from x.y to x.(y+1) we expect that any x.y client will work with any x.y or x.(y+1) server. I think this is what our statement "MINOR version increment indicates addition of functionality in a backwards-compatible manner" means. Any addition of functionality means that a client assuming/needing the new functionality will not work with an older server.
In this model, adding a requirement for support of the new feature doesn't seem breaking, but somehow the notion of changing the compliance levels perhaps still is...? or is at least fuzzy?
Pinging thread...
@azaroth42: 2 @zimeon: 1 or 2 @jpstroop: Optional in 2.x, 1 in 3.0
@mikeapp @tomcrane Others?
@jpstroop reiterates that anything other than optional in the 2.x.x series introduces a breaking change.
Re-reading #470 where we agreed on Optional due to compliance being major only... and thus changing my opinion to follow @jpstroop. From that thread @zimeon also seemed okay with it too.
Barring additional input, I propose that we run with it.
Just wanted to thank the editors for taking this up: We've been using a local extension to the 2.0 spec for this (we call the named region 'featured', but it's the same). In addition to scrolls, it's been useful to name algorithmically generated thumbnail regions for smaller objects photographed on light tables, book pages with large amounts of whitespace, etc.
Closed in 9ac188dc31259acd133e2181f2536adb7c46c17a
i.e. make square thumbnails without getting the info.json first. SUL and Klokan have the use case. There isn't a way to do this presently.