2

深度缩放作曲家本身就是一个非常好的工具。我想知道是否有任何自动组合方式?例如,我有 100 张图像,我想自动合成为 10 * 10 深度缩放效果。我正在实施后台工作流程并自动撰写深度缩放和发布。我更喜欢的输出类型是“图像”和“导出为集合(多个图像)”。

有参考样品或文件吗?我正在使用 VSTS2008 + C# + .Net 3.5。

4

2 回答 2

4

看看这篇关于应用程序中包含的 DeepZoomTools.dll 的帖子。

于 2009-08-09T15:54:19.177 回答
2

这里有一个很棒的示例项目,如果您真的想发疯并以编程方式生成图像/图块,您可以尝试此 MSDN 文章中引用的那种东西。

我自己并没有找到很多关于 DeepZoomTools.dll 的真实文档,但我创建了一个小型测试 Web 服务来将单个上传的图像转换为 Deep Zoom 源。相关代码为:

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;
        }

返回路径的使用如下:

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

(原谅草率的代码。它确实有效。)

于 2009-08-10T22:48:30.033 回答