Codejoy Codejoy - 1 month ago 7
Python Question

Compressing Deep Zoom Image files

Is there away to compress Deep Zoom Image files, very similar to compressing tiled kml files to kmz? I have many image files that have been tiled into DZI images and this creates a TON of images for the OS to handle. Just one of your tiff files converts into a folder with 5,500 items. I was hoping to compress this folder somehow and have Open Sea Dragon open it. I am not even sure if this was possible but figured I would ask to start working on a manageable solution.

Answer

Sounds like you're wanting to store the DZI as a single file (or at least fewer files), i.e. that the problem is how many files there are, not so much how much space they take up, right?

There's no silver bullet here, but there are various avenues to explore.

The simplest is just to go with a bigger tile size. In the past a tile size of ~256 was recommended, but with modern networks and computers, ~512 or even ~1024 should be fine. This should reduce your tile count to a quarter or a sixteenth respectively, assuming you're using 256 now. (By the way, if you're using the recommended 1 pixel overlap value for your DZI, then you'd use a tile size of 510 or 1022.)

There is also work underway to create a single file DZI format... see here:

https://github.com/openseadragon/openseadragon/issues/944

Further afield, you could switch to a different solution, such as the IIPImage server, which lets you store images as TIFF or JPEG2000, and the server breaks it up for you. That server supports IIIF, which OpenSeadragon supports.

http://iipimage.sourceforge.net/

Comments