// For complete examples and data files, please go to https://github.com/groupdocsannotation/GroupDocs_Annotation_NET
// Get input file stream
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(filePath), FileMode.Open, FileAccess.ReadWrite);
// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();
// Resource redaction annotation
AnnotationInfo resourceRedactionAnnotation = new AnnotationInfo
{
AnnotationPosition = new Point(852.0, 271.78),
BackgroundColor = 3355443,
Box = new Rectangle(466f, 271f, 69f, 62f),
PageNumber = 0,
PenColor = 3355443,
Type = AnnotationType.ResourcesRedaction,
CreatorName = "Anonym A."
};
// Add annotation to list
annotations.Add(resourceRedactionAnnotation);
// Export annotation and save output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Images);