Screenshot annotation
Paste a screenshot, point at the problem, and black out anything that must not leave the building. Annotations stay editable objects until you export, so nothing is baked in until you say so.
Annotate a screenshot
Redaction that actually redacts
The redaction tool replaces the pixels underneath it, so the hidden content is genuinely gone
from the exported file rather than covered by a layer someone can move. It comes in three modes -
Solid, Pixelate and Blur; the worked example uses the first
two. Solid blocks are the safe choice: pixelation and a strong blur are usually irreversible in
practice, but text can sometimes be recovered when its possible values are few, and a solid
rectangle removes all doubt. Redactions are always drawn before other annotations, so an arrow
you place on top is never blurred away.
Redaction is about pixels; metadata is a separate leak. This page exports with
MetadataPolicy.Remove - see Metadata and privacy.
// Annotations are records, so building one is a value, not a mutation.
await editor.AddAnnotationAsync(new RedactionAnnotation
{
Rectangle = new RectangleF(40, 120, 320, 28),
Mode = RedactionMode.Solid, // Pixelate and Blur are also available
});
await editor.AddAnnotationAsync(new ArrowAnnotation
{
Start = new Vector2(500, 380),
End = new Vector2(360, 220),
Style = ShapeStyle.Default with { Stroke = new StrokeStyle { Width = 6 } },
});
await editor.AddAnnotationAsync(new StepAnnotation
{
Center = new Vector2(340, 400),
Number = 1,
});
await editor.AddAnnotationAsync(new CalloutAnnotation
{
Bubble = new RectangleF(620, 420, 260, 64),
Target = new Vector2(700, 330), // where the leader line points
Text = "Total shows 0",
TextStyle = new TextStyle { FontSize = 22, Bold = true, Alignment = TextAlignment.Center, Baseline = TextBaseline.Middle },
});Every kind of annotation
Annotations are records drawn over the image and its layers, each one selectable, movable,
rotatable, fadable, lockable and reorderable until export - in the editor with the pointer or
the keyboard, and from code with AddAnnotationAsync, UpdateAnnotationAsync
and DeleteAnnotationAsync.
| Record | Draws |
|---|---|
RectangleAnnotation, EllipseAnnotation | A shape, outlined or filled, solid or dashed. |
LineAnnotation, ArrowAnnotation | A straight line, or one with an arrow head at its end. |
FreehandAnnotation, PolygonAnnotation | A smoothed pen stroke, or a closed outline through points. |
TextAnnotation | A label in any registered font, wrapped, with an optional background box - shaped right to left where the text is. |
CalloutAnnotation | A speech bubble with text and a leader line to what it explains. |
StepAnnotation | A numbered marker for the order of a tutorial or a reproduction. |
HighlightAnnotation | A translucent block, like a marker pen. |
RedactionAnnotation | Hidden content: solid, pixelated or blurred, in the pixels themselves. |
ImageAnnotation | An image stamped in a rectangle: a logo, a sticker, a signature. |
Pasting from anywhere on the page
ListenForPasteAsync listens for the browser's own paste event, which carries the
image with it - so Ctrl+V works without the clipboard permission prompt.
LoadFromClipboardAsync, behind the button, reads the clipboard directly; that
needs the permission, which is why the button is only enabled where the capability probe
found the API. Copy the result closes the loop the other way:
CopyToClipboardAsync renders the edit at full resolution and puts it on the clipboard
as PNG, the format browsers reliably accept, ready to paste into the report.