File Details | |
File Size | 7.2 MB |
---|---|
License | Freeware |
Operating System | Windows Vista/XP |
Date Added | July 22, 2010 |
Total Downloads | 2,511 |
Publisher | Microsoft Corp. |
Homepage | Microsoft Deep Zoom Composer |
- Deep Zoom Composer
- Microsoft Deep Zoom Composer
- Microsoft Deep Zoom Backgrounds
- What Is Microsoft Zoom
- Microsoft Deep Zoom Meeting
- How To Use Microsoft Zoom
- Microsoft Deep Zoom App
Publisher's Description
Deep Zoom Composer
Deep Zoom originally known as SeaDragon is now a Microsoft Presentation. Deep Zoom allows users to interact with high-resolution images in a highly interactive manner. It allows the user to zoom into an image up to a larger extent; it enables smooth loading and panning by serving up multi-resolution images and using spring animations. Creating Zooming Images OpenSeadragon works with a variety of zooming image formats. These zooming images generally consist of a number of individual tiles, organized so they can be accessed as needed. If you have a large image you'd like to zoom, you'll need to convert it first. Microsoft Releases Zoom.it – Apply Deep Zoom Effect To Your Images Microsoft Live Labs just released a new free web-based service named Zoom.it – which allows users to view, create and share high-resolution images. The MultiScaleImage class is one of the key objects of Silverlight's Deep Zoom technology. MultiScaleImage is modeled after MediaElement and allows a user to open a multi-resolution image or collection of images. For information about the format, see Deep Zoom. By default, a user cannot zoom into or pan across the image loaded by MultiScaleImage. Microsoft also gave the district expedited access to features that made Zoom so instantly popular, such as the ability to show more people on the screen at once and a raise-your-hand button.
Microsoft Deep Zoom Composer is a tool to allow the preparation of images for use with the Deep Zoom feature currently being previewed in Silverlight 2 Beta 2. The new Deep Zoom technology in Silverlight allows users to see images on the Web like they never have before. The smooth in-place zooming and panning that Deep Zoom allows is a true advancement and raises the bar on what image viewing should be. High resolution images need to be prepared for use with Deep Zoom and this tool allows the user to create Deep Zoom composition files that control the zooming experience and then export all the necessary files for deployment with Silverlight 2.
iimagegrapher reviewed v1.0.1945.1 on Nov 26, 2011
I like http://www.imagesurf.net for online deep zoom of photos!
Balderstrom reviewed v1.0.000.0 on Jul 29, 2009
Silverlight actually is very cool. As another reviewer said of 3.0 - it's what .NET should've been. As far as 'Flash' it's a travesty that so many .avi's and .mpg's have been 'repackaged' completely uneccessarily into flash containers. Flash on the web are just exploits waiting to happen, far worse than activeX ever was.
As far as Deep Zoom Composer goes, meh microsoft should just support SVG like everyone else, instead of repackaging the idea into a proprietary format. If I could give it 2.5 I would, so I'll round up.
CyberDoc999 reviewed v0.9.000.8 on Jun 27, 2009
Microsoft should realize that flash is the standard and they are not!
Microsoft is out of touch and have their heads in the clouds
Pkshadow reviewed v0.9.000.8 on Jun 27, 2009
I agree with previous review.
Microsoft is not the end all of everything nor is nor should it be allowed to be.
I limit all MS junk on all my systems and and stand by the fact I support 2nd & 3rd party developers.
MS you will loose this game or throw it in the trash bin like all other good applications you have acquired and destroyed over the years.
When 'you' seek public input as per Win7 or been held up against the wall like Win XP users you again do well.
Your force feeding of new applications and learning curves is not at all wanted especially in a down turn economy.
I would rather support what I know and trust in Flash and Java than play your Master of the Universe Game.
AntiochMedia reviewed v0.9.000.6 on Dec 9, 2008
Forgive me rating this without trying it ... just wanted to TROLL on here that I'm noticing that Microsoft is making a pretty good attempt to create tons of applications for developing Silverlight content in a way that Adobe never has for flash ... Adobe's flash platform relies on many well known applications (JW Media Player, SlideshowPro, multiple panorama viewers, and in this case .. whatever the name of the deep zoom like component that ships with Photoshop is that a 3rd party made).
I'm interested to see where this all goes. I'm still to this very day completely unwilling to use and incorporate Silverlight as flash is already ubiquitous and I cannot see anything that it cannot do that Silverlight is toting.
Silverlight might be the best idea that Microsoft has had in years that for many reasons, no one should really care about. Microsoft might have wanted to one-up Adobe by developing their own flash generation kit (like SWiSH) and taking that across the board for things like PowerPoint (generating your presentations as flash for web publishing) ...
But Microsoft seems to want to do things the hard way that alienates a potential userbase and overly complicates the ideas until they are superceded by another ill-fated project.
Microsoft develops some beautifully slick productivity applications. Office is the best and most relevant because Microsoft has actually established themselves as the standard in the field of desktop productivity.
Can't someone clever at Microsoft realize that beating other companies at their own game is better than trying to reinvent the game during the last inning?
iimagegrapher reviewed v1.0.1945.1 on Nov 26, 2011
I like http://www.imagesurf.net for online deep zoom of photos!
Balderstrom reviewed v1.0.000.0 on Jul 29, 2009
Silverlight actually is very cool. As another reviewer said of 3.0 - it's what .NET should've been. As far as 'Flash' it's a travesty that so many .avi's and .mpg's have been 'repackaged' completely uneccessarily into flash containers. Flash on the web are just exploits waiting to happen, far worse than activeX ever was.
As far as Deep Zoom Composer goes, meh microsoft should just support SVG like everyone else, instead of repackaging the idea into a proprietary format. If I could give it 2.5 I would, so I'll round up.
CyberDoc999 reviewed v0.9.000.8 on Jun 27, 2009
Microsoft should realize that flash is the standard and they are not!
Microsoft is out of touch and have their heads in the clouds
Pkshadow reviewed v0.9.000.8 on Jun 27, 2009
I agree with previous review.
Microsoft is not the end all of everything nor is nor should it be allowed to be.
I limit all MS junk on all my systems and and stand by the fact I support 2nd & 3rd party developers.
MS you will loose this game or throw it in the trash bin like all other good applications you have acquired and destroyed over the years.
When 'you' seek public input as per Win7 or been held up against the wall like Win XP users you again do well.
Your force feeding of new applications and learning curves is not at all wanted especially in a down turn economy.
I would rather support what I know and trust in Flash and Java than play your Master of the Universe Game.
AntiochMedia reviewed v0.9.000.6 on Dec 9, 2008
Forgive me rating this without trying it ... just wanted to TROLL on here that I'm noticing that Microsoft is making a pretty good attempt to create tons of applications for developing Silverlight content in a way that Adobe never has for flash ... Adobe's flash platform relies on many well known applications (JW Media Player, SlideshowPro, multiple panorama viewers, and in this case .. whatever the name of the deep zoom like component that ships with Photoshop is that a 3rd party made).
I'm interested to see where this all goes. I'm still to this very day completely unwilling to use and incorporate Silverlight as flash is already ubiquitous and I cannot see anything that it cannot do that Silverlight is toting.
Silverlight might be the best idea that Microsoft has had in years that for many reasons, no one should really care about. Microsoft might have wanted to one-up Adobe by developing their own flash generation kit (like SWiSH) and taking that across the board for things like PowerPoint (generating your presentations as flash for web publishing) ...
But Microsoft seems to want to do things the hard way that alienates a potential userbase and overly complicates the ideas until they are superceded by another ill-fated project.
Microsoft develops some beautifully slick productivity applications. Office is the best and most relevant because Microsoft has actually established themselves as the standard in the field of desktop productivity.
Can't someone clever at Microsoft realize that beating other companies at their own game is better than trying to reinvent the game during the last inning?
July 2009
Volume 24 Number 07
By Jeff Prosise | July 2009
.SidebarContainerA { width: 400px; height: 465px; float: right; border: 2px solid #008080;padding: 10px 20px 0px 20px; background-color: #e1e8f5; margin: 20px 0px 20px 10px; font-family: Verdana, Arial; font-size: 12px; padding-bottom: 7px; line-height: 16px; color: #333333; }
Contents
Fixing Composer's Panning Logic
Accessing Sub-Images and Metadata
Dynamic Deep Zoom: Supplying Image Pixels at Run Time
DeepZoomTools.dll
After Silverlight Deep Zoom was introduced to the world at MIX 2008, the buzz surrounding it persisted for weeks. An outgrowth of the Seadragon project at Microsoft Live Labs, Deep Zoom is a Silverlight adaptation of a technology for presenting vast amounts of pictorial data to users in a highly bandwidth-efficient manner. Sister adaptations that target Windows Mobile and AJAX are available and serve to increase the reach of the platform.
If you haven't seen Deep Zoom before, drop what you're doing and visit the canonical Deep Zoom site at memorabilia.hardrock.com. Use the mouse to pan around in the scene and the mouse wheel to zoom in and out. Thanks to Deep Zoom, you don't have to download gigabytes (or terabytes) of imagery to browse the Hard Rock Café's vast memorabilia collection. Deep Zoom downloads only the pixels it needs at the resolution it needs, and in Silverlight, the complexity of Deep Zoom is masked behind a remarkable control named MultiScaleImage. Once a Deep Zoom scene is composed (typically with Deep Zoom Composer, which you can download for free from go.microsoft.com/fwlink/?LinkId=148861), presenting the scene in a browser requires little more than declaring a MultiScaleImage control and pointing the control's Source property to Deep Zoom Composer's output. Supporting interactive panning and zooming requires a little mouse-handling code that interacts with the control, but these days Deep Zoom Composer will even provide that for you.
Despite the ease with which a basic Deep Zoom application can be built, you're missing out on the true richness of Deep Zoom if you go no further than Deep Zoom Composer takes you. Did you know, for example, that you can programmatically manipulate the images in a Deep Zoom scene, that you can create metadata and associate it with each image, or that Deep Zoom images can come from a database or be composed on the fly? Some of the truly remarkable Deep Zoom applications out there rely on a little-known feature of Deep Zoom that adds a whole new dimension to the platform.
If you care to take Silverlight Deep Zoom to the next level, here are three ways to do just that.
Fixing Composer's Panning Logic
First things first: if you want to get more out of Deep Zoom, the first thing you should know is not to trust the mouse-handling code emitted by Deep Zoom Composer. The code that pans around the scene in response to MouseMove events 'loses' the mouse if you pan too quickly. Try it. Take any Deep Zoom app created by Deep Zoom Composer and position the mouse cursor over an identifiable point or pixel in the scene. Then move the mouse quickly back and forth and up and down a few times. Observe that when you stop and the scene springs back to the cursor position, the cursor is no longer located at the point it was when you started. The more and faster you move, the greater the difference. It's not a deal breaker, but try the same experiment on the Hard Rock Memorabilia site and you'll find that the scene reliably snaps back to the original cursor position no matter how hard you try to fool it.
Figure 1 shows how to modify Deep Zoom Composer's code to fix the problem. First, declare two new fields named lastViewportOrigin and lastMousePosition in the Page class in Page.xaml.cs. (While you're at it, delete the fields named dragOffset and currentPosition, because they're not needed.) Then rewrite the MouseLeftButtonDown and MouseMove handlers as shown. You'll find that the scene snaps back to precisely the original cursor position when you stop moving the mouse, and if you're as fastidious as I am about these things, you'll be able to sleep at night once more.
Figure 1 Fixing Deep Zoom Composer's Panning Code
Accessing Sub-Images and Metadata
You may have noticed that when you export a project from Deep Zoom Composer, you're offered the choice of exporting as a composition or as a collection The latter option comes with one very desirable benefit: rather than exporting a Deep Zoom scene containing all the images you added lumped together into one monolithic image, it exports a scene containing individually addressable sub-images. The sub-images are exposed through the MultiScaleImage control's SubImages property, and because they are individually addressable objects, the sub-images can be manipulated, animated, and fumigated (just kidding!) to add sparkle and interactivity to Deep Zoom applications.
Each item in the SubImages collection is an instance of MultiScaleSubImage, which derives from DependencyObject and includes the properties AspectRatio, Opacity, ZIndex, ViewportOrigin, and ViewportWidth. The latter two combine to determine a sub-image's size and position in a Deep Zoom scene. Be aware that when a MultiScaleImage control first loads, its SubImages property is empty. Your first opportunity to iterate over the sub-images is when the control fires its ImageOpenSucceeded event.
One use for the SubImages property is to hit-test individual images in order to display metadata—titles, descriptions, and so forth—in response to clicks or mouseovers. Another use for it is to programmatically rearrange the images in a Deep Zoom scene. The DeepZoomTravelDemo application shown in Figure 2demonstrates how to do both. When you position the mouse over one of the images in the scene, a partially transparent information panel appears on the right containing an image title and description. And when you click the Shuffle button in the upper left corner, the images rearrange themselves in random order.
Figure 2 DeepZoomTravelDemo
The nine images featured in DeepZoomTravelDemo are photos I snapped on some of my overseas trips. I imported them into Deep Zoom Composer, arranged them in a grid, and exported the scene (making sure to select 'Export as Collection'). Then I imported the output from Deep Zoom Composer into a Silverlight project and added zooming and panning logic similar to that in the preceding section. To keep the download size manageable (13MB versus 170MB), I deleted the bottom two layers of the image pyramid that Composer generated before I uploaded the app to the MSDN Code Gallery. The version that you download works just fine, but when you zoom, the images get grainy a lot quicker than they do in the original version.
Displaying image metadata as DeepZoomTravelDemo does presents two challenges to the developer. First, where do you store the metadata, and how do you associate it with images in the scene? Second, how do you correlate the items in the MultiScaleImage control's SubImages collection with images in the scene since the MultiScaleSubImage class provides no information relating the two?
The first task—storing the metadata—is accomplished by entering a text string into the Tag box displayed in the lower right corner of Deep Zoom Composer when an image is selected. I used it to store each image's title and description, separated by plus signs. Composer writes the tags to the Metadata.xml file created when you export the project. Each image in the scene is represented by an <Image> element in Metadata.xml, and each <Image> element contains a sub-element named <Tag> that contains the corresponding tag. Figure 3shows the <Image> element written into Metadata.xml for the image in the upper left corner of the scene. Composer's tag editing interface is somewhat clumsy since the Tag box is so small, but you can always edit the Metadata.xml file manually as I did to tag each image with a title and description.
Figure 3 An <Image> Element in Metadata.xml
It would be great if the MultiScaleSubImage class had a Tag property that was automatically initialized with the content of the <Tag> element; but it doesn't, so you have to improvise. First, you can write a bit of code that downloads Metadata.xml and parses the tags from it. Second, you can use the <ZOrder> elements in Metadata.xml to correlate <Image> elements with images in the Deep Zoom scene. If the scene contains nine images (and the MultiScaleImage control's SubImages collection therefore contains nine MultiScaleSubImage objects), SubImages[0] corresponds to the image whose <ZOrder> is 1, SubImages[1] corresponds to the image whose <ZOrder> is 2, and so on.
DeepZoomTravelDemo uses this correlation to store image titles and descriptions. At startup, the Page constructor uses a WebClient object to initiate an asynchronous download of Metadata.xml from the server's ClientBin folder (see Figure 4). When the download is complete, the WebClient_OpenReadCompleted method parses the downloaded XML with an XmlReader and initializes the field named _Metadata with an array of SubImageInfo objects containing information about the images in the scene, including titles and descriptions. The class is shown here:
Figure 4 Downloading Metadata.xml and Correlating Metadata with Sub-Images
The <ZOrder> values read from Metadata.xml are used to order the SubImageInfo objects in the _Metadata array, ensuring that the order of the items in the _Metadata array is identical to the order of the items in MultiScaleImage's SubImages collection. In other words, _Metadata[0] contains the title and description for SubImages[0], _Metadata[1] contains the title and description for SubImages[1], and so on. Incidentally, I used XmlReader rather than LINQ to XML to avoid increasing the size of the XAP file by introducing an extra assembly required by LINQ to XML (System.Xml.Linq.dll).
Now that _Metadata is initialized with SubImageInfo objects containing titles and descriptions, the next step is to write the code to display the titles and descriptions. That happens in Figure 5. The MouseMove handler that pans the Deep Zoom scene if the left mouse button is down behaves differently if the left mouse button is up: it hit-tests the scene to determine whether the cursor is currently over one of the sub-images. Hit testing is performed by the helper method named GetSubImageIndex, which returns -1 if the cursor isn't over a sub-image or a 0-based image index if it is. That index identifies both a sub-image in MutliScaleImage.SubImages and a SubImageInfo object in _Metadata. A few lines of code copies the title and description from the SubImageInfo object to a pair of TextBlocks and one more line of code triggers an animation that displays the information panel if it's not already displayed. Note that GetSubImageIndex checks the sub-images for hits in reverse order since the final sub-image in the MultiScaleimage control's SubImages collection is highest in the Z-order, the next-to-last sub-image is second highest in the Z-order, and so on.
Figure 5 Hit-Testing the Sub-Images
In addition to supporting mouseovers, DeepZoomTravelDemo lets you rearrange the images in the scene. If you haven't already, try clicking the Shuffle button in the upper left corner of the scene. (In fact, click it several times; the images will assume a different order each time.) The rearranging is performed by the Shuffle method in Figure 6, which creates an array containing all the images' ViewportOrigins, reorders the array using a random-number generator, and then creates a Storyboard and a series of PointAnimations to move the sub-images to the positions contained in the reordered array. The key here is that the MultiScaleimage control's SubImages property exposes the sub-images to your code, and you can modify a sub-image's ViewportOrigin property to change its position in the scene.
Figure 6 Shuffling the Sub-Images
As I researched this column, I found several blog entries that provided helpful information. One was Jaime Rodriquez's ' Working with Collections in Deep Zoom.' Another was ' Deep Zoom Composer—Filtering by Tag Sample', which was written by a member of the Expression Blend team and presents a technique for filtering Deep Zoom images based on image tags. Implementing mouseovers, rearranging the images in a scene, and filtering images based on tag data are but a few of the features made possible by the ability to address the individual sub-images in a Deep Zoom scene and associate metadata with them.
Making Dynamic Deep Zoom Even Better
I have been fascinatedby fractals ever since I discovered them some 20 years ago. I wrote my first Mandelbrot viewer in the early 1990s, if memory serves me correctly. My bookshelf of oldie-but-goodie computer books still contains a pristine copy of a book titled Fractal Image Compression by Barnsley and Hurd that I used in a research project on data compression in the mid-90s. And one of my favorite books of all time is Chaos by James Gleick (Penguin, 2008).
Building an interactive and visually compelling Mandelbrot viewer for browsers is something I've wanted to do since the first day I laid eyes on Silverlight. Dynamic Deep Zoom made it possible. The downside, of course, is that the images are generated on the server and downloaded to the client, leading to unwanted latency and also increasing the load on the server.
Silverlight 2 doesn't include an API for generating bitmaps on the client, but you can generate them anyway using Joe Stegman's Silverlight PNG encoder. Minh Nguyen used it to build Mandelbrot Explorer, which you can read all about it in his blog article ' Minh T. Nguyen's Mandelbrot Explorer 1.0 in Silverlight 2.0 with source code.' Silverlight 3, which will be in beta by the time you read this, has a bitmap API, but the problem remains that Deep Zoom wants to pull images from the server. It is unclear at the moment whether the next version of Deep Zoom will have a client-side story, but if it does, you can bet that I'll be revising MandelbrotDemo for Silverlight 3 to work entirely on the client.
Dynamic Deep Zoom: Supplying Image Pixels at Run Time
Deep Zoom Composer's export feature generates all the data needed by a MultiScaleImage control. That data includes an XML file (dzc_output.xml) that references other XML files, which in turn reference the individual images in the scene. Composer's output also includes hundreds (sometimes thousands) of image tiles generated from those images. The tiles form an image pyramid, with each level of the pyramid containing a tiled version of the original image, and each level representing a different resolution. The level at the top of the pyramid, for example, might contain a single tile with a 256x256 rendition of the image. The next level down would contain four 256x256 tiles which, put together, form a 512x512 version of the image. The next level down would contain sixteen 256x256 tiles representing different parts of a 1,024x1,024 image, and so on. Deep Zoom Composer generates as many levels as necessary to depict the original image in its native resolution. As a user zooms and pans in a Deep Zoom Scene, the MultiScaleImage control is constantly firing off HTTP requests to the server to fetch image tiles at the proper resolution. It also does some slick blending work to smooth the transition from one level to another.
What you probably don't realize about the MultiScaleImage control is that it doesn't require Deep Zoom Composer. Composer is really just a tool for quickly and easily creating Deep Zoom projects that incorporate scenes built from static images. As an alternative to providing MultiScaleImage with static content, you can generate content at run time in response to requests from MultiScaleImage and download that content to the client.
Why would you ever need to generate Deep Zoom content at run time? Developers ask me how to do this all the time. 'Is it possible to supply image data to Deep Zoom dynamically?' The reason is that it enables a whole new genre of Deep Zoom applications that fetch image tiles from databases and that generate image tiles on the fly.
Microsoft Deep Zoom Composer
Want an example? Check out the Deep Earth project and an example of Deep Earth at work at deepearth.soulsolutions.com.au/. Deep Earth is referred to as a mapping control powered by the combination of Microsoft's Silverlight 2 platform and the DeepZoom (MultiScaleImage) control. In other words, it's a control you can drop into a Silverlight application to expose the vast amount of geographic data available from Microsoft Virtual Earth through a Deep Zoom front end. You can start in outer space and zoom all the way down to your front lawn. And the zooming is amazingly smooth, thanks to the work done behind the scenes by MultiScaleImage and the Deep Zoom runtime.
Deep Earth isn't driven by a bunch of XML files and image tiles output by Deep Zoom Composer; it supplies image tiles to the MultiScaleImage control dynamically, and it fetches image tiles from Virtual Earth. Users of Deep Earth refer to this as 'dynamic Deep Zoom.'
Microsoft Deep Zoom Backgrounds
The application depicted in Figure 7demonstrates the basics of dynamic Deep Zoom. MandelbrotDemo provides a Deep Zoom window into the Mandelbrot set—probably the most famous fractal in the world. The Mandelbrot set is infinitely complex, which means that you can zoom in forever and the level of detail will never decrease. Mandelbrot viewers are common in the software world, but few are as slick as the one that uses Deep Zoom. Try it; run MandelbrotDemo and zoom in on some of the swirling regions at the edge of the Mandelbrot set (at the boundary between black and bright colors). You can't zoom in forever because even a dynamic Deep Zoom scene has a finite width and height, but the scene's dimensions can be very, very large (up to 232 pixels per side).
What Is Microsoft Zoom
Two Views of the Mandlebrot Set
The first step in implementing dynamic Deep Zoom is to derive from Silverlight's MultiScaleTileSource class, which is found in the System.Windows.Media namespace of System.Windows.dll, and override the GetTileLayers method. Each time the MultiScaleImage control needs a tile, it calls GetTileLayers. Your job is to create an image tile and return it to the MultiScaleImage control by adding it to the IList passed in GetTileLayers' parameter list. Other parameters input to GetTileLayers specify the zoom level (literally, the level of the image pyramid from which tiles are being requested) and the X and Y position within that level of the pyramid of the tile that is being requested. Just as X, Y, and Z values are sufficient to identify a point in 3D coordinate space, an X value, a Y value, and a level, uniquely identify an image tile in a Deep Zoom image pyramid.
Figure 8 shows the MultiScaleTileSource-derived class featured in MandelbrotDemo. The GetTileLayers override does little more than submit an HTTP request for the image tile to the server. The endpoint for the request is an HTTP handler named MandelbrotImageGenerator.ashx. Before we examine the handler, however, let's see how MandelbrotTileSource is wired up to a MultiScaleImage control.
Figure 8 MultiScaleTileSource Derivative
Figure 9 shows an excerpt from MandelbrotDemo's Page.xaml.cs file—specifically, the XAML code-behind class's constructor. The key statement is the one that creates a MandelbrotTileSource object and assigns a reference to it to the MultiScaleImage control's Source property. For static Deep Zoom, you set Source to the URI of dzc_output.xml. For dynamic Deep Zoom, you point it to a MultiScaleTileSource object instead. The MandelbrotTileSource object created here specifies that the image being served up measures 230 pixels on each side and is divided into 128x128-pixel tiles.
Figure 9 Registering a Deep Zoom Tile Source
The work of generating the image tiles is performed by MandelbrotImageGenerator.ashx back on the server (see Figure 10). After retrieving input parameters from the query string, it creates a bitmap depicting the requested tile and writes the image bits into the HTTP response. DrawMandelbrotTile does the pixel generation. When called, it converts the X-Y-level value identifying the image tile that was requested into coordinates in the complex plane (a mathematical plane in which real numbers are graphed along the X axis and imaginary numbers—numbers that incorporate the square root of -1—are graphed along the Y axis). Then it iterates through all the points in the complex plane that correspond to pixels in the image tile, checking each point to determine whether it belongs to the Mandelbrot set and assigning the corresponding pixel a color representing its relationship to the Mandelbrot set (more on this in a moment).
Microsoft Deep Zoom Meeting
Figure 10 HTTP Handler for Generating Deep Zoom Image Tiles
Sadly, there is virtually no documentation on Silverlight's MultiScaleTileSource class. Lest you think I'm a genius for figuring all this out (anyone that knows me will attest that I am not), let me give credit where credit is due. As I wrestled with the meaning of the input parameters and how to map Deep Zoom X-Y-level values to the complex plane, I found an excellent blog post by Mike Ormond, Deep Zoom, MultiScaleTileSource and the Mandelbrot Set. His post provided key insights into dynamic Deep Zoom and also referenced another blog post, The Mandelbrot Set, that describes an efficient approach to computing the Mandelbrot set. My work was probably halved by work others had done before me.
One final note on my implementation: virtually every application that renders the Mandelbrot set uses a different color scheme. I chose a scheme that assigns pixels representing coordinates that belong to the Mandelbrot set black, and pixels representing coordinates outside the Mandelbrot set RGB colors. The further a coordinate lies from the Mandelbrot set, the 'cooler' or bluer the color; the closer it lies to the Mandelbrot set, the 'hotter' the color. Distance from the Mandelbrot set is determined by how rapidly the point escapes to infinity. In the code here, this is the number of iterations it takes DrawMandelbrotTile's while loop to determine that the point is not part of the Mandelbrot set. The fewer the iterations, the further the point lies from the set of points that make up the Mandelbrot set. I factored the code that generates an RGB color value from the iteration count into a separate class named ColorMapper ( Figure 11). If you want to experiment with different color schemes, simply modify the GetColor method. You can see the results of the gray-scale rendering by doing the following:
Figure 11 ColorMapper Class
DeepZoomTools.dll
How To Use Microsoft Zoom
A final tidbit of information regarding Deep Zoom that you might find useful involves an assembly named DeepZoomTools.dll. Deep Zoom Composer uses this assembly to generate tiled images and metadata from the scenes that you build. In theory, you could use it to build composition tools of your own. I say 'in theory' because there's precious little out there in terms of documentation. Find out more about DeepZoomTools.dll on the Expression Blend and Designblog. And shoot me an e-mail if you come up with some unique, creative uses for Deep Zoom but aren't quite sure how to make it do what you want it to do.
Microsoft Deep Zoom App
Send your questions and comments for Jeff to wicked@microsoft.com.
Jeff Prosise is a contributing editor to MSDN Magazineand the author of several books, including Programming Microsoft .NET(Microsoft Press, 2002). He's also cofounder of Wintellect ( www.wintellect.com), a software consulting and education firm that specializes in Microsoft .NET. Have a comment on this column? Contact Jeff at wicked@microsoft.com.