About

I’m Jim Lynn. I currently work as a software developer in BBC Future Media. At the moment, I’m working on Silverlight projects, including iStats Analytics, an internal tool used to visualise usage of the BBC iPlayer. I’ve also developed some prototypes using Ordnance Survey mapping and Silverlight Deep Zoom. I gave a presentation about this project which you can see here.

My previous project was the DNA social media engine, which I initially developed for Douglas Adams’ company, The Digital Village, and which was subsequently bought by the BBC. It’s used all over the BBC, to power sites like h2g2, message boards, and blog comments. It’s written in C++, C#, SQL Server, XSLT and some vestige of perl.

This is my personal blog, and at no point am I speaking for or on behalf of my employer. All opinions are my own.

9 comments

  1. Thanks for the post Jim! Here on the Seadragon team we’ve run into this issue a lot. There are several other possibilities for you to consider:

    – Move the files around with ROBOCOPY. This is a lot more efficient than just dragging folders in Explorer. It’s better still on newer versions of Windows at each end – they’ve been trying to tune this scenario.

    – ZIP the files up and then UNZIP on the server. This takes a lot of time in the ZIP and UNZIP but is fast in the move.

    – ZIP the files up and then use a server module which can read files out of ZIP. There’s one for Apache and I believe there are some for IIS as well.

    We’re working on improving this in future versions of Silverlight as well.

  2. Hi Jim:
    Your post are really good, however, none of them addresses an issue I have. Therefore, I am writing you this question.
    I am trying to use a MultiScaleImage control with embedded images, images that are in my .xap file. I am not getting anywhere with this. I used the DeepZoomComposer and genereated files. If I copy the “GeneratedImages” folder into the ClientBin folder everything works as expected. Then, I am importing the entire “GeneratedImages” folder into my Silverlight project. Now, the multiscaleimage control is empty. No images are shown. My attempt to write a custom MultiScaleImageTileSource have failed.
    Can you help please?
    Thanks
    –tolga

    1. Off the top of my head, I don’t think you can do what you’re trying to do. All MultiScaleImageTileSource implementations can only supply absolute URLs, which cannot reference data in your xap file.

      And if you think about it, that makes sense. If your embedded image is small enough to be stored embedded in the XAP file, then you’d be far better off referencing it as a single image, rather than a Deep Zoom image. Deep Zoom is best used when you have very large images, or lots of images, and you don’t want the user to have to download the whole of each image.

      If you want to make a regular image behave the same way as a deep zoom image, then you’d have to write the interaction code to make that happen.

      Sorry if this is unhelpful, but I’ve never tried doing what you’re suggesting, so I don’t have any code examples to hand.

  3. Hi!
    I am developing a project, which uses Deep Zoom technology.
    All works fine on Silverlight 3 runtime, but on Silverlight 4 I experienced some problems. I use ASPX Handler that generates XML for my MultiScaleImage.
    In Silverlight 3 I use the code mentioned below and it works fine:

    MapHandlerUri = “GeneratedImages/MapHandler.ashx”;
    msi.Source = new DeepZoomImageTileSource(new Uri(MapHandlerUri, UriKind.Relative));

    But in Silverlight 4 MultiScaleImage sends request to handler MapHandler.ashx only once at startup. I’ve turned off all caching mechanisms but It did not help.

    Can you advise me, please, how to fix this problem?

    1. If you’re trying to generate a new xml file each time you hit the handler, then it does seem as if it’s caching the request.

      One way to avoid caching like this is to generate a unique URL for each request. You could do something like:

      MapHandlerUri = “GeneratedImages/MapHandler.ashx?p=” + rnd.Next();

      (assuming that rnd is a class field of type Random)

      Assuming your handler doesn’t care about the value of p, making it change each time you set it should prevent any caching between Silverlight and the server.

      1. Thank you for fast reply.

        I tried your variant before and also tried this code:
        in MapHandler.ashx:

        context.Response.Cache.SetCacheability(HttpCacheability.NoCache)

        But the point is that MultiScaleImage doesn’t even try to send request to Handler when changes Source property.

        In my opinion developers from Microsoft tried to optimize MultiScaleImage in SL4 but they didn’t take into consideration that Source can be non static XML file.
        I tried to set

        msi.Source = null;

        and after that

        msi.Source = new DeepZoomImageTileSource(new Uri(MapHandlerUri, UriKind.Relative));

        but nevertheless it doesn’t make MultiScaleImage to download MapHandler.ashx

        P.S. Finally I did it. I change URI to MapHandler.{uniqueID}ashx then in global.asax rewrite path to handler and image files. MultiScaleImage excepts it as a new Source and downloads XML every time. That’s exactly what I needed.

  4. Hi Jim,
    I’m nowhere near as technical as your good self, but would love to see the silverlight / deep zoom / OS integration – there doesn’t seem to be a link?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s