cantaloupe-project / cantaloupe

High-performance dynamic image server in Java
https://cantaloupe-project.github.io/
Other
267 stars 107 forks source link

Tiling on demand #40

Closed FPaquette closed 8 years ago

FPaquette commented 8 years ago

Hi, Our institution is looking to replace our old images server & viewer which are Erez and FSI Viewer. We are pretty much set on the viewer we would be using but we are still looking for an images server. Cantaloup has all the options we are looking for and is one of the servers we are considering. Could you tell me if it's possible to tile images on demand and not beforehand? I am not seeing anything about it in the documentation but I would like to be sure. Looking at all the images servers out there, none are offering this possibility so there is surely a good reason.

Thank you very much! Francois

adolski commented 8 years ago

Hi Francois, of course, Cantaloupe, like most/all(?) other IIIF image servers, is capable of generating tiles on demand. Nothing is generated beforehand.

Some image formats are more efficient to work with in this respect than others: for example, if you are intending to extract tiles from a very large JPEG, it probably won't be quite as fast as from a multi-resolution tiled TIFF. There is some discussion of this in the images section of the user manual. But in general, on-the-fly tiling is possible for all supported formats.

FPaquette commented 8 years ago

Thank you very much for your quick answer, I'll take a closer look at the section you are refering to.

For you information, I was talking to someone at IIP Image and it's not possible to generate tiles on demand.

adolski commented 8 years ago

Maybe I am misunderstanding, but it is definitely possible to get a tile (a cropped region) of an image from most IIIF servers, including IIPImage, on-demand.

For example, this URL will get you the top-left quadrant of an image, and you can manipulate the "pct:x,x,x,x" part to get any region you want:

https://iiif.library.illinois.edu/dls/iiif/2/162%2F2204%2F6736109%2Faccess%2F6736109_033.jp2/pct:0,0,50,50/400,/0/default.jpg

FPaquette commented 8 years ago

Oh, we are not talking about exactly the same thing :)

If I’m not wrong, what you are referring to is using the tiles when they are already created. I do agree, all of the images servers are able the send only the tile that is needed to the viewer.

The information I am looking for is about creating those tiles. From what we have read so far, tiles need to be created beforehand only. Here’s an example of what we would like to know if it’s possible :

  1. No tiles are created in the images server, only the full tiff or jpeg files are available.
  2. A patron is looking at many thumbnails.
  3. He clicks on one he would like to see.
  4. The server would then create the tiles

I hope it’s a bit clearer now, sorry about the language barrier!

adolski commented 8 years ago

Hi Francois, I think we are talking about the same thing. There is no need to create tiles beforehand with Cantaloupe, IIPImage, Loris, etc. The image server creates tiles when they are requested. That is to say, it opens the full source TIFF/JPEG/etc. file, reads a tile out of it, and returns it to the client.

That is a big part of an image server's job. Otherwise you could just generate a bunch of tiles yourself and put them on a web server and you wouldn't need an image server at all.

FPaquette commented 8 years ago

We will definitely give Cantaloupe a try then, thank you for the clarification.