1: static void CreateCollection(string collectionName, string sourceImagesFolder, string outputFolder)
2: {
3: // Create a collection converter
4: CollectionConverter collectionConverter = new CollectionConverter();
5: // Required parameters
6: collectionConverter.SparseImageToolPath = GetSparseImageToolPath();
7: collectionConverter.ImagesCollection = GetImages(sourceImagesFolder); // IEnumerable<string> containing the path of the images
8: collectionConverter.ImagesDestinationFolder = outputFolder;
9: // Optional parameters
10: collectionConverter.CollectionName = collectionName;
11: collectionConverter.CollectionFormat = CollectionConverter.CollectionFormats.XML;
12: //collectionConverter.ConvertedOverlapPixels = ...
13: //collectionConverter.ConvertedTileSize = ...
14: //TODO: You can customize the exporting experience here, by setting the according parameters such as:
15: // Tile Size, File Format, Collection Format, Compression, Quality, ...
16:
17: // Attach to completion handler
18: collectionConverter.BatchCompleted += delegate
19: {
20: Console.WriteLine("Conversion completed\nPRESS <ENTER> TO EXIT");
21: };
22:
23: try
24: {
25: collectionConverter.BatchCollectionExport();
26: }
27: catch (Exception e)
28: {
29: Console.WriteLine(e.Message);
30: }
31:
32: Console.WriteLine("Conversion started...");
33: Console.ReadLine();
34: }