IIIF / cookbook-recipes

For working on the recipes
https://iiif.io/api/cookbook/index.html
37 stars 32 forks source link

Manifest thumbnail should return the correct sized image #393

Closed glenrobson closed 9 months ago

glenrobson commented 1 year ago

In: https://iiif.io/api/cookbook/recipe/0117-add-image-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,

should return an image which is 219 pixels by 300 not the full sized images.

glenrobson commented 1 year ago

also add width and height into thumbnail service.

giacomomarchioro commented 10 months ago

It seems also that for keeping the same aspect ratio it should be 219 by 302.

giacomomarchioro commented 10 months ago

Actually, https://github.com/IIIF/cookbook-recipes/commit/1fb1d7cf363f595ef0ad281277c0be0efe4cb53b changed it from returning the correct size to the full image, I guess the reason is in this sentence:

https://github.com/IIIF/cookbook-recipes/blob/a89c866ac9d989d8a78e6de59bfc9932ef2ecc51/recipe/0117-add-image-thumbnail/index.md?plain=1#L24

glenrobson commented 10 months ago

So make the thumbnail dimensions match the full sized image as we've specified max as the size in the URL.

In:

"extraFormats": [
            "jpg",
            "png"
          ],

remove jpg because its the default and not an extra.

glenrobson commented 9 months ago

Fixed in: https://github.com/IIIF/cookbook-recipes/pull/460