Tritium UI
TritiumImageEditor
Load a picture, paint and select on it, adjust it, and export PNG or JPEG.
Key features
- Load from a file, stream, or byte array, and export PNG or JPEG to a stream or file.
- Paint with pen, pencil, highlighter, eraser, spray, bucket, gradient, clone, and recolor tools.
- Draw lines, curves, rectangles, ellipses, arrows, and text, with bold, italic, size, and font.
- Select with a rectangle, ellipse, lasso, or magic wand, then copy, cut, paste, crop, fill, feather, expand, or contract.
- Rotate, flip, crop, resize the canvas, and adjust brightness, contrast, hue, saturation, blur, sharpen, and other effects.
- Keep a layer stack: add, duplicate, delete, rename, reorder, flatten, set opacity, and blend (normal, multiply, screen, overlay, darken, lighten).
- Undo, redo, and jump to a history step.
- Zoom, pan, and fit the image; on Windows the mouse wheel zooms at the pointer.
- Show or hide the paint toolbar, and raise ImageChanged after an edit.
Platforms
Android, iOS, Mac Catalyst, and Windows 10 version 19041 and later (.NET 10 MAUI). Mouse-wheel zoom is available on Windows; pinch and the zoom tool work on the other platforms.
Main API
- LoadFromStreamAsync . Loads an image from a stream; LoadFromFileAsync and LoadFromBytesAsync are the other entry points.
- AnnotateTool . The active paint, select, or view tool.
- Export . Returns PNG or JPEG bytes; ExportToFileAsync writes a file.
- ImageChanged . Fires after the working image changes.
Basic example
Declare this namespace on the page.
xmlns:image="clr-namespace:Tritium.Maui.ImageEditor;assembly=Tritium.Maui.ImageEditor"
<image:TritiumImageEditor x:Name="Editor" ShowPaintToolbar="True" IsAnnotateMode="True" /> Add the package source from your license, then reference the package that includes this control. These packages are not on the public NuGet Gallery.