Last active
June 23, 2016 11:50
-
-
Save bjoerntx/4dc8fb2c4722d8729b3f323530306d35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using TXTextControl.ReportingCloud; | |
class RCSamples | |
{ | |
public static void GetTemplateThumbnails(string templateName) | |
{ | |
ReportingCloud rc = new ReportingCloud( | |
"username", | |
"password", | |
new Uri("https://api.reporting.cloud")); | |
try | |
{ | |
List<Image> lstThumbnails = rc.GetTemplateThumbnails( | |
templateName, 20, 1, 0, ImageFormat.PNG); | |
foreach (Image img in lstThumbnails) | |
{ | |
string sImageFilename = Guid.NewGuid().ToString() + ".jpg"; | |
img.Save(sImageFilename, System.Drawing.Imaging.ImageFormat.Jpeg); | |
Console.WriteLine("Image saved to: " + sImageFilename); | |
} | |
} | |
catch (Exception e) | |
{ | |
Console.WriteLine("An error occurred: " + e.Message); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment