0

我有一个关于天珠图像创建的问题。我使用以下代码在 C# 中生成天珠图像。

public string GetGenetatedImage()
{

    ImageCreator creator = new ImageCreator();

    creator.TileFormat = ImageFormat.Png;
    creator.TileOverlap = 1;
    creator.TileSize = 256;

    string RootPath = HttpContext.Current.Server.MapPath("~/Images/new.png");


    List<string> files = new List<string>()
    {               
       RootPath

    };
    string root = HttpContext.Current.Server.MapPath("~/Images/GeneratedImagesnewGrid/");


    List<string> dzi = new List<string>();
    foreach (var name in files)
    {
        string output = Path.Combine(root, Path.GetFileNameWithoutExtension(name) + ".dzi");
        dzi.Add(output);
        creator.Create(name, output);
    }

    CollectionCreator ccreator = new CollectionCreator();
    ccreator.TileFormat = ImageFormat.Png;
    ccreator.TileOverlap = 1;
    ccreator.TileSize = 256;
    ccreator.Create(dzi, Path.Combine(root, "da.dzc"));

    string rtvalue = HttpContext.Current.Server.MapPath("~/Images/GeneratedImagesLighthouse/newGrid.dzi");

    return rtvalue;

}

我正在使用 DeepZoomTools。

我的输入文件在这里

我获得的输出在这里

我的输出文件似乎缺少文件。'

客户端代码:

   OpenSeadragon({
                    id:             "example-zoomit-tilesource",
                    prefixUrl:       "openseadragon/images/",
                    defaultZoomLevel:        1,
                    minZoomLevel:         1,
                    maxZoomLevel:         3,
                    visibilityRatio:         0.3,
                    tileSources:   [{
                                    Image: {
                                            xmlns:    'http://schemas.microsoft.com/deepzoom/2008',
                                            Url:      "http://***.net/Content/img/GeneratedImagesnewGrid555/last5_files/",
                                            Format:   'png',
                                            Overlap:  "0", 
                                            TileSize: "256",
                                            ServerFormat: "Default",
                                    Size: { 
                                        Width: "5816",
                                        Height: "3961"
                                    }
                                           },


                                  },
                             ]
                });

我在这里做错了吗?我找不到为什么我的输出缺少文件。

请帮忙,谢谢。

4

1 回答 1

1

此问题已修复,请参阅以下注释:https ://github.com/openseadragon/openseadragon/issues/205#issuecomment-23394315

于 2013-08-28T16:47:31.697 回答