Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

add full/ support to iiif layout in dzsave #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jcupitt opened this issue Nov 18, 2019 · 14 comments
Closed

add full/ support to iiif layout in dzsave #1472

jcupitt opened this issue Nov 18, 2019 · 14 comments

Comments

@jcupitt
Copy link
Member

jcupitt commented Nov 18, 2019

From #1465 (comment)

Apologies late to this ticket, am very interested in making use of this feature, but it would really need the full region to be created for compliance with viewers (see https://iiif.io/api/image/3.0/compliance/#3-image-parameters). Good examples from Tom Crane to illustrate this here: https://tomcrane.github.io/scratch/osd/iiif-sizes.html

@jcupitt jcupitt changed the title add full/ support to iiif layout in dzsave add full/ support to iiif layout in dzsave Nov 18, 2019
@jcupitt
Copy link
Member Author

jcupitt commented Nov 18, 2019

Hi @atiro,

I wasn't sure if full/ was absolutely necessary. It would be quite a large change to support it efficiently, so I was hoping it was optional!

A quick and drity hack to add this would be to simply build the 1/2, 1/4, 1/8 size images in memory, then write them all at the end. This would push up memory use a lot, but it would be easy, and fairly quick. Perhaps that would be enough for now.

@atiro
Copy link

atiro commented Nov 18, 2019

That sounds good @jcupitt , I have to admit it's a struggle to get my head round the sizes/tiles calculations in the info.json. (oh, and hello from over the road)

@tomcrane
Copy link

tomcrane commented Jan 6, 2020

/full/max/ is necessary, but the sizes property demonstrated in my example ^^ is not.

And .../full/max/0/default.jpg could just be the source image at its actual size (or maximum supported size) converted to JPEG.

@jcupitt
Copy link
Member Author

jcupitt commented Jan 6, 2020

Thanks @tomcrane, that sounds very simple to add as a post-processing step.

This is too late now for 8.9 (we're in feature freeze), let's revisit this for 8.10.

@jcupitt
Copy link
Member Author

jcupitt commented Jan 6, 2020

(oh, and hello from over the road)

I am intrigued @atiro ! Which road is this?

@atiro
Copy link

atiro commented Jan 6, 2020

Only the road with the best art museum in the city on (and some other museums that are apparently also popular). Come over for a coffee and a chat when/if you have a free moment.

@jcupitt
Copy link
Member Author

jcupitt commented Jan 6, 2020

You're at the V&A? I used to know the head of photographic, James something, I expect he's moved on.

The NG is obviously the best art museum in the city! Tsh.

@edsilv
Copy link

edsilv commented Mar 17, 2020

Hi @jcupitt,
I've been helping with adding IIIF support to sharp, but we've run into an issue (seemingly with libvips): lovell/sharp#2098 (comment)
I think it's possibly related to your comment above?

@jcupitt
Copy link
Member Author

jcupitt commented Mar 18, 2020

Hi @edsilv, would you mind making a test case to show the problem?

@edsilv
Copy link

edsilv commented Apr 1, 2020

@jcupitt sorry for the delay on this! I'll aim to get it done asap :-)

@scotnewsedits
Copy link

scotnewsedits commented Jun 9, 2020

@jcupitt sorry for the delay on this! I'll aim to get it done asap :-)

I have a test image for this if it helps;
1328400.jpg
https://app.box.com/s/r8p1xv0ffc7l1zlph3761be81raslvv2
( It is an export of the Eyes East towards Europe https://www.davidrumsey.com/luna/servlet/s/2ti74w )

vipsheader 13284000.jpg
13284000.jpg: 11653x7737 uchar, 3 bands, srgb, jpegload

vips --version
vips-8.10.0-Sat Jun 6 13:46:15 UTC 2020

vips dzsave 13284000.jpg test --layout iiif

tail test/info.json

        4,
        8,
        16
      ],
      "width": 512
    }
  ],
  "width": 11654,
  "height": 7738
}

generating the vips-properties.xml it has

<?xml version="1.0"?>
<image xmlns="http://www.vips.ecs.soton.ac.uk//dzsave" date="2020-06-09T09:36:44.799753Z" version="8.10.0">
  <properties>
    <property>
      <name>width</name>
      <value type="gint">11653</value>
    </property>
    <property>
      <name>height</name>
      <value type="gint">7737</value>
    </property>

@cmahnke
Copy link

cmahnke commented Nov 7, 2020

Any news on this issue?
I would like to use this feature, currently I'm planning to get around it by just adding the file myself in a way suggested by @tomcrane here

But it's my understanding that the actual URL depends on the version of the IIIF Image API, for version 2 it seems to be 'full/full/0/default.jpg' and for version 3 'full/max/0/default.jpg'. Since dzsave creates version 2 manifests by default, the suggestion from the linked comment seems to be wrong.

Since I'm currently building libvips by myself to get the fix for #1818, I would be able to test the suggested quick fix if it can be supplied as a patch or PR.

@jcupitt
Copy link
Member Author

jcupitt commented Nov 7, 2020

Hi @cmahnke, I'm horribly busy at the moment. I might get some time to work on this in December.

@cmahnke
Copy link

cmahnke commented Nov 7, 2020

Hi @cmahnke, I'm horribly busy at the moment. I might get some time to work on this in December.

Thanks, it's not urgent at all on my side, I've just added the the needed mkdir -p $TARGET/full/full/0/ and cp $IMAGE $TARGET/full/full/0/default.jpg to my wrapper script.

Anyways, maybe it's a starting point to add a parameter for the requested IIIF manifest version. That would probably a change big enough to wait for the next release cycle, as you pointed out here.

@jcupitt jcupitt closed this as completed Feb 17, 2021
@libvips libvips locked and limited conversation to collaborators Feb 17, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

6 participants