title: C# : dzi image creation opensedragon
body: <p>I have an issue regarding the dzi image creation. I use the following code for dzi image generation in C#.</p>
  
  <pre><code>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&lt;string&gt; files = new List&lt;string&gt;()
      {               
         RootPath
  
      };
      string root = HttpContext.Current.Server.MapPath("~/Images/GeneratedImagesnewGrid/");
  
  
      List&lt;string&gt; dzi = new List&lt;string&gt;();
      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;
  
  }
  </code></pre>
  
  <p>I am using DeepZoomTools.</p>
  
  <p>My input file is <a href="http://applicate.co.nz/opensea/image.html" rel="nofollow">here</a></p>
  
  <p>Output i obtained is <a href="http://applicate.co.nz/opensea/indexgridnew.html" rel="nofollow">here</a></p>
  
  <p>My output file seems to be having missing files. '</p>
  
  <p>Client side code :</p>
  
  <pre><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"
                                      }
                                             },
  
  
                                    },
                               ]
                  });
  </code></pre>
  
  <p>Am i doing something wrong here? I cant find why my output has missing files.</p>
  
  <p>Please help,
  Thanks.</p>