In our most recent release of Deep Zoom Composer, one of the major changes we made was to change how we generated the image tiles both for designing as well as exporting your Deep Zoom Content. In the past, ever since our first release at MIX, our image encoding was done using a combination of SparseImageTool.exe and ImageTool.exe command line tools. Starting with this release, we have retired those tools and have shifted to a preview version of a .NET based DLL that provides image generation capabilities.

If you look inside your Deep Zoom Composer installation folder, which is by default, [Program Files]\Microsoft Expression\Deep Zoom Composer, you will see a file called DeepZoomTools.dll:

 dztoolsPNG

This DLL contains all of the functionality needed for you to generate image tiles for compositions and collections. The classes and methods that you can use are as follows:

public enum ImageFormat { Jpg, Png, Wdp };

public class Image
    public Image(string path)
    public double MaxViewportWidth
    public double MinViewportWidth
    public string Path
    public Point ViewportOrigin
    public double ViewportWidth

public class ImageCreator
    public ImageCreator()
    public double ImageQuality
    public int TileSize
    public int TileOverlap
    public ImageFormat TileFormat
    public bool CopyMetadata
    public void Create(string source, string destination)

public class CollectionCreator
    public CollectionCreator()
    public double ImageQuality
    public int TileSize
    public int MaxLevel
    public ImageFormat TileFormat
    public bool CopyMetadata
    public void Create(ICollection<Image> images, string destination)
    public void Create(ICollection<string> images, string destination)

public class SparseImageCreator
    public double ImageQuality
    public int TileSize
    public int TileOverlap
    public ImageFormat TileFormat
    public Color BackgroundColor
    public bool CopyMetadata
    public void Create(ICollection<Image> images, string destination)

The API should be pretty straightforward. A DeepZoomTools.Image is the internal notion of a Deep Zoom image, and it contains all of the information such as the viewport widths, path to source image, origin, etc. ImageCreator is used to define an image and write the image tiles to disk. CollectionCreator and SparseImageCreator take a list of image paths and write the image tiles to disk.

When I was playing with this, the one thing that confused me was what CollectionCreator expected as its “image path”. It isn’t a string of paths to raw JPG, PNG, etc. files. It is actually a path to the Deep Zoom Image created via ImageCreator/SparseImageCreator. SparseImageCreator does take in a list of paths to the source image, so passing in a list of image files will work for generating sparse images (aka Compositions).

Do note that this DLL is a pre-release version, and the Live Labs team will decide when and how to more formally release this in the future. Even though Deep Zoom Composer uses this same DLL, there may be future releases of this DLL that are independent of Deep Zoom Composer releases.

Thanks,
Kirupa