Question

I have an issue regarding the dzi image creation. I use the following code for dzi image generation in 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;

}

I am using DeepZoomTools.

My input file is here

Output i obtained is here

My output file seems to be having missing files. '

Client side code :

   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"
                                    }
                                           },


                                  },
                             ]
                });

Am i doing something wrong here? I cant find why my output has missing files.

Please help, Thanks.

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top