From 8f1d7c28739270f40d97258cb4e6fbe5c20a5865 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 18 Aug 2025 11:55:29 -0400 Subject: added image foreground mask function. added ui buttons for removing background, masking foreground. --- src/client/views/global/globalScripts.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client/views/global/globalScripts.ts') diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts index e098d50d8..981c4d111 100644 --- a/src/client/views/global/globalScripts.ts +++ b/src/client/views/global/globalScripts.ts @@ -552,6 +552,16 @@ ScriptingGlobals.add(function videoSnapshot() { selected?.Snapshot(); }); +// eslint-disable-next-line prefer-arrow-callback +ScriptingGlobals.add(function imageMaskForeground() { + const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox; + selected?.maskForeground(); +}); +// eslint-disable-next-line prefer-arrow-callback +ScriptingGlobals.add(function imageRemoveBackground() { + const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox; + selected?.removeBackground(); +}); // eslint-disable-next-line prefer-arrow-callback ScriptingGlobals.add(function imageSetPixelSize() { const selected = DocumentView.Selected().lastElement()?.ComponentView as ImageBox; -- cgit v1.2.3-70-g09d2