Last active
April 22, 2019 14:25
-
-
Save GroupDocsGists/bf83acf3db01ad01bd687557758c32e3 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
// For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET | |
// Create instance of annotator. | |
AnnotationConfig cfg = CommonUtilities.GetConfiguration(); | |
AnnotationImageHandler annotator = new AnnotationImageHandler(cfg); | |
// Get input file stream | |
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(CommonUtilities.filePath), FileMode.Open, FileAccess.ReadWrite); | |
List<PageImage> images = annotator.GetPages(inputFile, new ImageOptions { WithoutAnnotations = true }); | |
//Then if we want get thumbnail we call GetThumbnail() method of PageImage item: | |
foreach (PageImage pageImage in images) | |
{ | |
Stream stream = pageImage.GetThumbnail(); // do something with stream | |
} | |
// Default image size was 300x180. If need specified image size, you can pass method parameters: | |
// image thumbnails 100x100 | |
foreach (PageImage pageImage in images) | |
{ | |
Stream stream = pageImage.GetThumbnail(100, 100); | |
// do something with stream | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment