How should I cleanly use the Seadragon.com or Zoom.it viewer in combination with my own DZI?

  • 1
  • Question
  • Updated 10 years ago
  • Answered
I'd like to use either the Seadragon.com or Zoom.it viewer with my own self hosted DZIs and I'm wondering what the best way to do that is.

When I glanced at the Javascript file that the embed code uses, the URL to the DZI is right at the end of the file, so presumably if I copy the file to my own server, replace that DZI URL and properties (resolution, tile resolution, etc.) with my own, and take care to repair any relative URLs, presumably everything would work. The obvious downside is that this means that if you update the viewer JS or XAP files on your end, my static file on my own server will become immediately antiquated.

The obvious question, given Bing's devouring of Live Labs, is how long the versions of the viewer files that you're hosting are going to be around.

The reason that I ask all of this is that I am about to suggest that a new photogrammetry forum, which is just starting up, enable the zoom.it viewer as a piece of custom bulletin board code. That is to say, since users are dissallowed to post HTML (and presumably Javascript) for the security of the board, there have been custom bulletin board tags created for Photosynths, PhotoCity point clouds, Vimeo and YouTube videos, etc., such as [photosynth]insert collection id here[/photosynth] which insert the correct parameter into the default HTML embed code for particular services and I would like to suggest that they implement the same for DZIs, as I would love to use them for illustrations (and the expansion of the use and awareness of the Seadragon format on the web). The big selling point of pointing to your sites' embed code for me is the progressive enhancement of Seajax to Silverlight, ensuring that everyone should be able to view my illustrations.

Ideally, I would like to have one single simple solution like:
[zoom]insert zoom.it ID or DZI URL here[/zoom].

It should be simplicity itself to get zoom.it images working, but custom URLs to other DZIs are more tricky as they would require copying and modifying the Javascript file from a random Zoom.it image, overwriting the DZI URL, and then saving a static copy of the .js file on their servers - just waiting to be out of date. I suppose that the board could dynamically create the JS file each and every time that the page was loaded, but that feels a little crazy to me.

It would be a lot simpler for me if I could just take the URL to the .DZI or .XML which is residing on my server and plug it into zoom.it or seadragon.com and get back a normal new zoom.it ID number (which will generate a normally named .js file on your servers which refers to the .DZI on my server, rather than one on yours) which could be placed inside the BB Code as is, so this is really something of a feature request.

If that is something which you don't want to do from a design perspective or simply do not have time to implement, given current circumstances, then what do you suggest for me? I need something simple to suggest to the admin. Having him write something which determines whether a simple zoom.it ID number has been placed within the BB Code tag or whether it is a full URL to an external DZI, fetching the .js file to modify and store, is much less appealing. I really really miss the functionality of the Seadragon AJAX page which built embed code for a DZI wherever it already was on the web and I've missed it from the launch of Seadragon.com.

The other solution is simply to settle for a particular build of Seadragon AJAX and the corresponding XAP, host them ourselves, and have BB Code ready to trigger a little server side script to parse the DZI URL out of a zoom.it or seadragon.com URL or, alternately, accept any other DZI URL from the web.
Photo of Nathanael Lawrence

Nathanael Lawrence

  • 795 Posts
  • 55 Reply Likes
  • lost.

Posted 10 years ago

  • 1
Photo of Aseem Kishore

Aseem Kishore, Former Employee

  • 702 Posts
  • 124 Reply Likes
Official Response
Hey Nathanael,

Sorry for the delay in responding here! As you can imagine, these last couple of weeks have been hectic, hectic, hectic. So thanks for your patience. =)

It's great to hear what you're doing! That's really awesome and it's great for spreading the Deep Zoom / multi-res awareness. =)

As you've likely heard by now, the great news is that Zoom.it is staying up! Many people around the company saw value in it, and the Silverlight team offered to continue to host and maintain it. So for the foreseeable future, you can count on Zoom.it embeds and related assets sticking around.

So right off the bat, I'd say that's the best solution for Zoom.it content -- just use the embeds directly.


[zoomit]11mb[/zoomit]
==
&lt;script src="<a href="http://zoom.it/11mb.js?width=auto&height=400px" target="_blank">http&#058;//zoom&#046;it/<strong>11mb</strong>.js?width=auto&height=400px</a>"&gt;&lt;/script&gt;
&nbsp;
&nbsp;

As for DZIs, you're absolutely right that Zoom.it should support them, and that we've had a gap in our story since we took down that "embed builder" for Seadragon Ajax.

But the good news is, this has never really been much of an issue in practice -- almost everyone prefers the simplicity of Zoom.it over the hassles involved in creating and uploading your own DZI somewhere. I wonder if this will be especially true for photography, where you really just want to show your photo -- you're not making a complex Deep Zoom composition (AKA sparse image).

So if you're willing to give it a shot initially without DZI support, you have a full and easy Zoom.it solution. What do you think? =)

If you still want DZI support, I have some ideas and a reasonable workaround for now, but it does complicate the simplicity a little bit, so I'm inclined to say "keep it simple" for now.

Hope this helps!
Photo of Nathanael Lawrence

Nathanael Lawrence

  • 795 Posts
  • 55 Reply Likes
Hi, Aseem,

Many thanks for the reply. I more than understand how busy things must be for you all. I am glad to hear that Zoom.it will continue to function for the time being.

My real issue is this: I want to create these really high resolution tutorial DZIs, but the most practical way to actually do that is to construct a sparse image with Deep Zoom Composer and export for Seadragon AJAX. Trying to create the entire thing as one enormous PNG file in my image editor to then hoist to my server and then aim Zoom.it at wouldn't be that bad except that my image editors tend to choke at that resolution, whereas Deep Zoom Composer doesn't need to load up that entire space at once to create the tiles.

I could ask the board administrator to support one BB code for Zoom.it embeds and create a second BB code for DZIs in the wild, but I was hoping to get it all in one simple tag. I love the combo viewer; I just wish that there was an easier way to get it to work with any DZI I point it to.

One alternative to getting a combo embed builder for stray DZIs would be to get Deep Zoom Composer to publish all Seadragon AJAX projects with the combo viewer, rather than only Seajax.

It honestly comes down to wanting simplicity. I don't want to have to request two different tags for the same format and hopefully the same viewer. It would be like having one embed code for Flickr images and needing a separate tag to embed all other images on the internet. I've already run up against the issue that, while the admin has enabled video embeds from YouTube and Vimeo, there's an entire world of other videos on the web, especially that relate to photogrammetry with all of the research videos out there. I'm also going to pitch him the idea of using a Flash or Silverlight video player (such as the Channel 9 SL viewer - though I haven't tested .movs in it and don't expect them to work) which can play as many common formats as possible - .mov, .wmv, .mpg, .mp4, etc. etc. to negate needing separate tags for each format of video or any sort of conversion. I'd like that same consolidation for DZIs. My primary desire is simplicity for the people who will be embedding media.

One last question before I sign off: What are the plans for the current Seadragon.com site?

For the moment, I'm asking because I'm sentimentally attached to the Seadragon logo being in the lower left corner of the viewer, rather than the Deep Zoom logo (no disrespect intended). I realize that using the older viewer points users to the seadragon.com domain, which will then forward them to the zoom.it domain which is not desireable. I'd like to use the zoom.it embed which would point people straight to the zoom.it domain, but swap out that logo for the Seadragon logo. It's easy enough for me to tweak the logo URL in Seajax, but not so easy, I suspect, to also affect the Silverlight viewer's logo. Parallel to that, I suspect - modifying the Seadragon.com embed code to link to zoom.it, rather that seadragon.com after the logo has been clicked would pose similar challenges. This is all just me imagining ahead without having actually tried this. Is the message of how to create one's own zoomable embed (when the logo is clicked) always displayed with AJAX, even if the Silverlight viewer is being used?
Photo of Nathanael Lawrence

Nathanael Lawrence

  • 795 Posts
  • 55 Reply Likes
I've since seen your latest and last company announcement and hit the seadragon.com domain myself, so those questions are answered.
Photo of Aseem Kishore

Aseem Kishore, Former Employee

  • 702 Posts
  • 124 Reply Likes
Official Response
Nathanael, thanks for your patience! I didn't forget about this, and wanted to answer some of your questions and offer the workaround I mentioned.

--

"One alternative to getting a combo embed builder for stray DZIs would be to get Deep Zoom Composer to publish all Seadragon AJAX projects with the combo viewer, rather than only Seajax."

Good news -- it already does! ;) We didn't announce it when we shipped this update, but we did update Deep Zoom Composer's "Seadragon Ajax" output option -- now named just "Seadragon" -- to spit out both a library.html that uses the Seadragon Ajax library and an embed.html that uses the Seadragon Combo Embed. Just upgrade to the latest version if you don't see this.

So as you can guess, my workaround involves simply using this combo embed for the cases where you have a DZI URL. The syntax is identical to the old Seadragon Ajax embed; only the URL has changed slightly:


[seadragon]path/to/my.dzi[/seadragon]
==
&lt;script src="http&#058;//seadragon&#046;com/combo/embed.js"&gt;&lt;/script&gt;
&lt;script&gt;
Seadragon.Config.proxyUrl = "path/to/proxy.php?url=";
Seadragon.embed("auto", "400px", "path/to/my.dzi");
&lt;/script&gt;
&nbsp;

As with the old Seadragon Ajax embed, this works out-of-the-box if your DZI is on the same domain as the page showing it. If it's on a different domain, add the extra width, height, tileSize, tileOverlap, tileFormat and displayRect parameters as before. (Let me know if you need help with this.)

<edit> I realized that (a) cross-domain will be a major scenario for any forum, and (b) it's actually much easier to work around that with a server-side proxy in this case than through manually parsing the DZI and getting that info out. So the one requirement is to have a simple proxy on the server (sample PHP code) and tell Seadragon to use it. Then it should "just work". =) </edit>

This should solve your scenario! =) The only difference will be that this one will show the old-style buttons and the Seadragon logo, while the Zoom.it viewer will of course show the new-style buttons and the Zoom.it logo. The behavior otherwise will be identical. Hopefully that's okay for now.

--

"It honestly comes down to wanting simplicity. I don't want to have to request two different tags for the same format and hopefully the same viewer. [...] I'd like that same consolidation for DZIs. My primary desire is simplicity for the people who will be embedding media."

This all goes back to what we both completely agree on -- Zoom.it should support DZI URLs. I can't emphasize enough that I agree that this should happen. =) I'm just saying that it never became a priority for us, because no one ever asked for that. (The only use case now for Deep Zoom Composer now -- besides collections which aren't viewable yet in Zoom.it anyway -- is sparse images, as you mention.)

--

"One last question before I sign off: What are the plans for the current Seadragon.com site? For the moment, I'm asking because I'm sentimentally attached to the Seadragon logo being in the lower left corner of the viewer, rather than the Deep Zoom logo (no disrespect intended). [...] Is the message of how to create one's own zoomable embed (when the logo is clicked) always displayed with AJAX, even if the Silverlight viewer is being used?"

These are really several questions! ;)

We haven't formally announced this yet, but we intend to keep Seadragon.com up going forward for the foreseeable future, specifically in order to not break all the sites out there that use the hosted version of Seadragon Ajax or our various embeds -- including this combo embed used by Deep Zoom Composer. So while the rest of Seadragon.com will be replaced by redirects, certain static resources like these will remain.

As I mentioned above, the combo embed shows the Seadragon logo, so that's not a problem in your case. =) I would recommend using the Zoom.it logo for the Zoom.it embed, though. While the Seadragon logo has sentimental value to both you and me, the Zoom.it logo is the more actionable and available brand right now and going forward -- especially given that the Silverlight team is interested in continuing to evolve the service!

That said, it's indeed not easy to replace the logo -- or the "about" message when you click it -- because it is indeed duplicated in both Ajax and Silverlight. (To answer your question directly, no, Ajax is not used for the message when the viewer is Silverlight.) The technical reasoning for this is that the Silverlight plugin has to be windowed in order to get the best visual performance, and that prevents overlaying Ajax content, so we had to duplicate all of the UI.

--

I hope all of this helps and answers your questions! =)
Photo of Aseem Kishore

Aseem Kishore, Former Employee

  • 702 Posts
  • 124 Reply Likes
Just a heads-up that I amended my reply with an easy cross-domain workaround.