Zoom.It

I had a quick play with with the (relatively) new Zoom.It site from LiveLabs ( click the image );

image

If you visit the site, you can point it at any image on the web or any website and create a DeepZoom from it.

I visited, entered my URL and it created me this one.

There’s a decent write-up over here with a working embedded example;

image

and it all seemed pretty neat to me but what I wasn’t sure of was whether you could do that without first visiting the site and entering the URL in order to get some embedding code for a specific pre-determined URL.

As an aside, I also didn’t want a script block because it causes me pain to embed that via my blog whereas I’ve already gone around the pain of configuring the thing to let me embed object tags.

There’s both a Silverlight and a JavaScript SDK so I took the Silverlight one and built a quick XAP which takes an initParam specifying the URL to be DeepZoomed and then it uses the SDK to call out to Zoom.It and get the corresponding DeepZoom generated dynamically and displayed.

This may already be there on the site via some fancy JS embed – I didn’t hunt it down.

So, this one for Microsoft.com below is embedded with something like

<object type="application/x-silverlight-2">
	<param name="source" value="http://www.mtaulty.com/downloads/SLZoomIt.xap"/>
	<param name="initParams" value="uri=http://www.microsoft.com" />
</object>

which causes us to go and get an image for Microsoft.com

and then I might embed others such as Apple;

and Dell;

This was a “just for fun” – note that the icons and mouse handling are mine so that’s why they don’t look/work so great but I enjoyed it whilst it lasted Smile and the SDK made it pretty easy with the core piece of code looking something like this;

   Zoomit.BeginGetContentInfo(PageUri, cb =>
          {
            ContentInfo contentInfo;

            if (Zoomit.TryEndGetContentInfo(cb, out contentInfo))
            {
              if (contentInfo.Ready)
              {
                Dispatcher.BeginInvoke(() =>
                  {
                    this.IsBusy = false;

                    this.msi.Source = new DeepZoomImageTileSource(contentInfo.Dzi.Uri);
                  });
              }
              else if (!contentInfo.Failed)
              {
                Dispatcher.BeginInvoke(() =>
                  {
                    this.Progress = contentInfo.Progress;
                  });
              }
              else
              {
                Dispatcher.BeginInvoke(() =>
                  {
                    this.IsBusy = false;
                    ShowError("Failed to load that URL");
                  });
              }
            }
          }, null);
      }

where Zoomit represents the static class that you get in the SDK and I have a UI that is binding to IsBusy and Progress and msi represents my MultiScaleImage on the screen.

It occurred to me that it’d be easy to put this into Live Writer as a quick “insert” option – kind of fun.