views:

246

answers:

2

Hello everyone,

Deep zoom composer itself is very nice tool. I am wondering if there are any automatic ways to compose? For example, I have 100 images, and I want to compose automatically as 10 * 10 deep zoom effect. I am implementing a background workflow and automatically composing deep zoom and publish. The Output Type I prefer is "Images" and "Export as a collection (multiple images)".

Any reference samples or documents? I am using VSTS2008 + C# + .Net 3.5.

thanks in advance, George

+4  A: 

Take a look at this post about DeepZoomTools.dll included in the app.

Michael S. Scherotter
Thanks link is very informative about object model, but as a beginner are there any runnable samples?
George2
+1  A: 

There's a great sample project here and if you really want to go crazy and generate images/tiles programatically, you can try the sort of thing referenced in this MSDN article.

I haven't found a lot of real documentation regarding DeepZoomTools.dll myself, but I created a small test webservice to turn a single uploaded image into a Deep Zoom source. The relevant code is:

public string CreateDeepZoomImage(byte[] abyte, string fileName)
        {
            ImageCreator ic = new ImageCreator();
            string FilePath = Path.Combine(_uploadPath, fileName);
            System.IO.FileStream fs = new System.IO.FileStream(FilePath, System.IO.FileMode.Create);
            fs.Write(abyte, 0, abyte.Length);
            fs.Close();
            FileInfo imageFileInfo = new FileInfo(FilePath);
            string destination = imageFileInfo.DirectoryName + "\\" + imageFileInfo.Name.TrimEnd(imageFileInfo.Extension.ToCharArray()) + "\\output.xml";
            ic.Create(FilePath, destination);
            string returnpath = "/Uploads/" + imageFileInfo.Name.TrimEnd(imageFileInfo.Extension.ToCharArray()) + "/output.xml";
            return returnpath;
        }

Where the return path is used like so:

ZoomImage.Source = new DeepZoomImageTileSource(new Uri(e.Result, UriKind.Relative));

(Forgive the sloppy code. It does work though.)

Raumornie