backgroundRemovalExtension<TSourceDocument> function
EditorExtension<TSourceDocument>
backgroundRemovalExtension<TSourceDocument>({
- required BackgroundRemovalPort port,
Adds host-owned background removal to the standard Image inspector.
This extension owns:
- Image-selection applicability;
- runtime editability presentation;
- canonical/effective source validation;
- asynchronous target and stale-result protection;
- mutation through
CanvasFields.imageSource; - editor feedback.
The supplied port owns the actual image processing and persistence.
Implementation
EditorExtension<TSourceDocument> backgroundRemovalExtension<TSourceDocument>({
required BackgroundRemovalPort port,
}) {
return _BackgroundRemovalExtension<TSourceDocument>(port: port);
}