Reputation: 179
I'm trying to display multiple images with OpenSeaDragon. I used Deep Zoom Composer to create the image files and it produced the following XML file (abridged):
dzc_output.xml:
<?xml version="1.0" encoding="utf-8"?>
<Collection MaxLevel="8" TileSize="256" Format="jpg" NextItemId="5" ServerFormat="Default" xmlns="http://schemas.microsoft.com/deepzoom/2009">
<Items>
<I Id="0" N="0" Source="dzc_output_images/ft1.xml">
<Size Width="825" Height="584" />
<Viewport Width="5.2402050398801272" X="-0" Y="-0" />
</I>
<I Id="1" N="1" Source="dzc_output_images/ft2.xml">
<Size Width="824" Height="583" />
<Viewport Width="5.2375806686733934" X="-1.0500455705877254" Y="-0" />
</I>
<!--3 more images not shown as not necessary-->
</Items>
</Collection>
I created a very simple HTML page to display the viewer (I plan to use Django for the final project). I created the viewer with the following code:
var viewer = OpenSeadragon({
id: "openseadragon1",
prefixUrl: "openseadragon/images/",
tileSources: "imagesources/dzc_output.xml",
sequenceMode: true
});
I'm using python -m http.server
to serve the folder that the html page is in. It worked fine for single images. However, with this dzc_output.xml file containing multiple images, the viewer displays "Unable to open [object Object]: Unable to load TileSource" when I load the page. Scrolling through the images produces this error: "Unable to open [object Object]: HTTP 404 attempting to load TileSource"
I'm not sure what the problem is here. Any help would be good.
Upvotes: 0
Views: 774
Reputation: 2174
Indeed... that's a "Deep Zoom Collection", which is a different format from "Deep Zoom Image" which is what OpenSeadragon supports. We have an issue for support DZCs: https://github.com/openseadragon/openseadragon/issues/67, but so far there hasn't been any action on it.
At this point you have a variety of options:
Now that we have true multi-image, supporting DZC shouldn't be too hard. One aspect, as discussed in https://github.com/openseadragon/openseadragon/issues/67, is that DZC also includes an additional tile pyramid with thumbnails for the images (see https://learn.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/cc645077(v=vs.95)#collections for more info). That's a nice optimization (saves on network traffic), but we can skip it for starters and just use the DZC as a directory of DZIs.
Note that this issue is also discussed in https://github.com/openseadragon/openseadragon/issues/1735.
Upvotes: 0