Saturday, June 7, 2008

Moving to Silverlight 2.0 Beta 2 from Silverlight 2.0 Beta 1

Always a willing masochist guinea pig to help uncover the latest round of Microsoft bugs and features, I upgraded to Silverlight Beta 2 the day it became available.  Here is a link to the files you need to install.  I uninstalled Beta 1 components first but others reported no problems upgrading over the Beta 1 bits.

Below is a running list of what needed to be updated on www.deepzoom.com, and here's the official change list.

Updating www.deepzoom.com to B2

  1. Switch to the B2 mime type in your .aspx or .htm file.  Below, the "silverlight-2-b1" has changed to "silverlight-2-b2", and don't forget to change the Installer URL to "LinkID=115261" so your clients will download B2 instead of B1.
       1: <div style="height: 100%; width: 100%;">
       2:     <object type="application/x-silverlight-2-b2" width="100%" height="100%">
       3:         <param name="source" value="ClientBin/DeepZoom.FullScreen.xap" />
       4:         <param name="onerror" value="onSilverlightError" />
       5:         <param name="background" value="white" />
       6:         <div id="no-sl" class="install-badge">
       7:             <img alt="Puget Sound" src="images/SeattleArea.gif" />
       8:             <a href="http://go.microsoft.com/fwlink/?LinkID=115261" 
       9:                 style="position: absolute;
      10:                 text-decoration: none; left: 260px; top: 150px;">
      11:                 <img alt="Get Microsoft Silverlight" 
      12:                     src="http://go.microsoft.com/fwlink/?LinkId=108181"
      13:                     style="border-style: solid; padding: 10px; 
      14:                     background: white;" /></a>
      15:         </div>
      16:     </object>
      17: </div>
  2. Toss out all your B1 Deep Zoom content and create it anew in Deep Zoom Composer B2.  I had problems opening old Composer projects, so I don't know if upgrades are supposed to be supported.  The image metadata is now stored as XML file instead of binary, and the per layer detail from the old format seems to be gone completely.  Here's a sample of the new format:
       1: <?xml version="1.0" encoding="UTF-8" ?> 
       2: <Image TileSize="256" Overlap="1" Format="png" 
       3:     xmlns="http://schemas.microsoft.com/deepzoom/2008">
       4:     <Size Width="14718" Height="14334" /> 
       5:     <DisplayRects>
       6:         <DisplayRect MinLevel="0" MaxLevel="14">
       7:             <Rect X="0" Y="0" Width="14718" Height="14334" /> 
       8:         </DisplayRect>
       9:     </DisplayRects>
      10: </Image>
    This also breaks my Deep Zoom analyzer program, DeepZoomAnalyze.exe, and I'll be working on an update for this problem.
  3. Setting the source for a MultiZoomImage has changed.  Note that DeepZoomImageTileSource is in System.Windows.Media.dll, so add a reference to it:
    using System.Windows.Media;
       1: msi.Source = new DeepZoomImageTileSource(new System.Uri("images/info.dzi"));
       2: // Or
       3: msi.Source = new YourMultiScaleTileSourceOverride();
    Notice that you can now provide your own Tile source provider, which opens up a slew of new possibilities for the use of MultiScaleImage.
  4. Tooltips have changed completely.  Throw away your code and start over.
  5. Update silverlight.js.

And that's about it.  Except for regenerating all of the content, it took about two hours to figure out the changes.  None of the mouse or scroll or zoom logic needed to change which was a great relief.

Deep Zoom Composer Problems and Feature Requests

  1. Uploading a 78MB Tiff file which worked fine in Beta 1 fails to load in Beta 2.  The file opens fine in Photoshop and Paint so I don't think it's a corruption issue.  No error is given at the completion of a long import, but the resulting image is 1x1 pixels.
  2. Importing to Deep Zoom Composer has become painfully slow.
  3. Feature request:  Provide an option when bringing images onto the composer canvas to not scale the images to some random default value.  I need to have the relative scale of multiple images preserved, but it looks like Composer finds the largest image dimension for all images, and then scales all subsequent images to this value.  While this might be the generally desired behavior, there's another large class of applications in which autoscaling is the wrong choice.
  4. Feature request:  Let me assign a transparency value to an image so I can align images which overlap others.

VS2008 problems

  1. For a while, every time I touched a XAML page in VS2008, it reported an exception but then completed my request anyway.  But this problem seems to have disappeared after a restart or two, this seems to have gone away.

Wednesday, June 4, 2008

DG.TV Jose Fajardo on DeepZoom Awesomeness

Jose Fajardo has a DeepZoom demonstration posted by Delicate Genius which ponders the question, “What if every web image is DeepZoomable?” 

Dive on into “DeepZoom Awesomeness”: