mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-02 06:57:04 -06:00
Pictures: Remove Background with a classical matte
The Picture Format > Remove Background button was a disabled placeholder. picture.removeBackground now flood-fills from every edge pixel through similar colours: each step must be close to the pixel before it (so gradients and soft shadows follow) and to the edge colour it started from (so it can't leak into the subject). That region turns transparent with a one-pixel soft edge, and the picture points at a new PNG; undo brings the original back. Tolerance 0-100 (default 20); the ribbon offers normal, looser and tighter. Pictures whose edges are all subject are left alone, and pictures over 16 megapixels are refused. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
pub mod animation;
|
||||
pub mod arrange;
|
||||
pub mod background;
|
||||
pub mod design;
|
||||
pub mod edit;
|
||||
pub mod file;
|
||||
@@ -130,6 +131,7 @@ pub fn command_specs() -> &'static [CommandSpec] {
|
||||
v.extend(slide::specs());
|
||||
v.extend(insert::specs());
|
||||
v.extend(shape::specs());
|
||||
v.extend(background::specs());
|
||||
v.extend(arrange::specs());
|
||||
v.extend(selection::specs());
|
||||
v.extend(merge::specs());
|
||||
|
||||
Reference in New Issue
Block a user