Skip to content
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

Problem with displaying multiple images from linked dzc_output.xml file #1735

Closed
MichaelNZ85 opened this issue Nov 8, 2019 · 1 comment
Closed
Labels

Comments

@MichaelNZ85
Copy link

Hi, 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):
<?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.

@iangilman
Copy link
Member

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: #67, but so far there hasn't been any action on it.

At this point you have a variety of options:

  • Export the images as DZIs from Deep Zoom Composer instead.
  • Write a script to convert the DZC output into a series of DZIs for use in OSD.
  • Help us implement DZC support natively to OSD.

Now that we have true multi-image, supporting DZC shouldn't be too hard. One aspect, as discussed in #67, is that DZC also includes an additional tile pyramid with thumbnails for the images (see https://docs.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants