Deep Zoom Composer: Deep Zoom composer is a tool that is available for Silverlight developers to compose and export multiple images with functionalities like Zoom and Pan. We can download and install Deep Zoom composer from here: Deep Zoom Composer
As we discuss earlier Deep Zoom allows us to Zoom and Pan high-resolution images without affecting the performance. Now we will see how to use Deep Zoom along with the Silverlight application.
Deep Zoom is a collection of tiles of JPEG and PNG images with different resolutions images that make an image pyramid. The size of the tile is by default 256x256, we can modify the size of tiles.
Every tile is stored in a separate file and the same for the pyramid. For the pyramid, each level of the pyramid is stored in a separate folder. This enables Deep Zoom to fetch the required size for the current size of the image on the screen, instead of downloading the whole image.
For example, if you zoom in to see highlighted part of an image, Deep Zoom will load only highlighted tile of the image instead of loading the whole image. We can create Deep Zoom images using the Deep Zoom Composer tool .
Steps for creating Deep Zoom image:
- First of all, we have to download and install Deep Zoom Composer.
- Start Deep Zoom Composer and create a new project, after that Import workspace and then click on Add image and add a high-resolution image to created project.
- Now, click on the compose workspace, on the images tab drag image onto the artboard.
- Give needed size to an image, click on Export workspace and then click the custom button.
- After that select Silverlight Deep Zoom from the output type section, and then give name and location. Select Export as a Composition from Image setting.
- Click on the export button to export the Deep Zoom images file.
After creating a Deep Zoom image, to load it we can use MultiScaleImage control. By using MultiScaleImage class we can open multi-resolution images, which can be Zoomed in / out and panned. We cannot zoom in or pan across the image which is loaded by the MultiScaleImage, but it includes various methods to zoom and pan that we can use. By default, the image is loaded by MultiScaleImage Zooms onto the page when the page is loaded first. We can disable this by setting the property UseSprings to false, but we have to set this property to true when users are interacting with the images. MultiScaleImage control only supports Deep Zoom images with no support for Deep Zoom Collection. We have to add a reference of DeepZoom.dll to the XAML file to use MutliScaleImage control.