mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 10:45:45 +00:00
Remove Background: a gray image colorized with a process color is refused
A process color can't colorize a grayscale image that has an alpha channel, and paint.setFill refuses that combination. Remove Background gave such an image an alpha channel and kept its process colorize color. It now refuses the run, changing nothing, when an image it is given is gray and colorized with a process color. It checks this before any image is decoded. Another image in the document that already has that combination does not affect a run on other images. Black, white and spot colors still colorize the result. The rule check_colorized applies to each image is now one function, paint::gray_colorized_with_process, which both checks call. Docs: docs/mcp.md (Remove Background), docs/target-app-parity.md.
This commit is contained in:
+5
-3
@@ -10001,9 +10001,11 @@ change in one undo step, and an image that `ids` names twice changes once. An im
|
||||
as it is, and when none changes the command adds no undo step and returns `changed: 0`. `cleared` counts the pixels
|
||||
made fully clear in the images that changed. The command refuses, and changes nothing, when an image is CMYK, a linked
|
||||
image shows its preview (embed or relink it first), an image would need more than the decode allowance while it is
|
||||
worked on (2 GiB, or 512 MiB in the web app, counted from the file's header before it is decoded), or every pixel of an
|
||||
image would be cleared. Remove Background… opens the command's dialog with Preview off; with Preview on, the canvas
|
||||
shows the result for the values in the dialog, and Cancel puts the image back. While a dialog previews the command,
|
||||
worked on (2 GiB, or 512 MiB in the web app, counted from the file's header before it is decoded), an image is
|
||||
grayscale and colorized with a process color (the result has an alpha channel, and only a spot color, black or white
|
||||
colorizes a grayscale image with transparency, as `paint.setFill` requires), or every pixel of an image would be
|
||||
cleared. Remove Background… opens the command's dialog with Preview off; with Preview on, the canvas shows the result
|
||||
for the values in the dialog, and Cancel puts the image back. While a dialog previews the command,
|
||||
the session keeps the decoded pixels of the images it changes (at most 128 MiB, or 32 MiB in the web app), so the next
|
||||
preview step does not decode them again; it releases them when the dialog closes with OK or Cancel. A run that is not
|
||||
a preview step does not keep them.
|
||||
|
||||
@@ -2015,7 +2015,7 @@ A VectorCraft addition (it replaces a script some users ran), so no area score m
|
||||
|
||||
## Image Tools add-on: Remove Background (2026-11-11)
|
||||
|
||||
A VectorCraft addition, so no area score moves. Object › Plug-ins › Image Tools › Remove Background… (`addon.image.removeBackground`) makes the background of the selected images transparent in their own pixels, in the app with no service or model. The background is the most common edge color (nothing is cleared when the edges hold at least as many clear pixels as pixels of that color), the average of the corners that are not clear, or picked colors. Contiguous (on by default) clears it only where it reaches in from an edge; off, it is cleared everywhere. Tolerance and Softness (0 to 100, 10 by default, VectorCraft's own values) set how near a color is cleared and the band over which pixels fade out, measured as RGB distance or, with Match set to Each Channel, as the largest difference on one channel. The run is one undo step, and none is recorded when no pixel changes. The image stays an image: a PNG with alpha at its own bit depth, gray or color as it was, with its color profile and resolution, and a linked image is embedded. CMYK images, linked images that show their preview, images that would need more than the decode allowance and results with no pixel left are refused. The dialog's Preview works as Release Type on a Path's does; its preview steps decode an image once, and the decoded pixels are released when the dialog closes. Tests: `cmd::addons::image::tests` in `vectorcraft-engine` (edge, corner and picked colors, contiguous on and off, a second run, tolerance and softness by distance and by channel, 16-bit and gray images, the color profile and resolution kept, an image read at another size, linked images, refusals and bad params, and decoded pixels reused across preview steps and released at OK and Cancel), `addons::image::tests::remove_background_previews_cancels_and_runs_on_ok` in `vectorcraft-ui-egui` and `command_sweep`. Commands: `docs/mcp.md` › Image Tools add-on. Since 2026-11-12 a selected image also offers Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar, where the reference app offers it (<https://community.adobe.com/announcements-651/ai-powered-image-editing-features-in-illustrator-1624061>); a click runs it at once with the defaults, as one undo step (tests `canvas::tests::the_task_bar_removes_a_selected_images_background` and `addons::image::tests::properties_and_the_control_bar_remove_the_background_at_once`).
|
||||
A VectorCraft addition, so no area score moves. Object › Plug-ins › Image Tools › Remove Background… (`addon.image.removeBackground`) makes the background of the selected images transparent in their own pixels, in the app with no service or model. The background is the most common edge color (nothing is cleared when the edges hold at least as many clear pixels as pixels of that color), the average of the corners that are not clear, or picked colors. Contiguous (on by default) clears it only where it reaches in from an edge; off, it is cleared everywhere. Tolerance and Softness (0 to 100, 10 by default, VectorCraft's own values) set how near a color is cleared and the band over which pixels fade out, measured as RGB distance or, with Match set to Each Channel, as the largest difference on one channel. The run is one undo step, and none is recorded when no pixel changes. The image stays an image: a PNG with alpha at its own bit depth, gray or color as it was, with its color profile and resolution, and a linked image is embedded. CMYK images, linked images that show their preview, images that would need more than the decode allowance, results with no pixel left and grayscale images colorized with a process color are refused (the result has an alpha channel, and a process color can't colorize a grayscale image with one: [Convert color modes](https://web.archive.org/web/20251220223850/https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/convert-color-modes.html), "Colorize Grayscale or 1-bit images"). The dialog's Preview works as Release Type on a Path's does; its preview steps decode an image once, and the decoded pixels are released when the dialog closes. Tests: `cmd::addons::image::tests` in `vectorcraft-engine` (edge, corner and picked colors, contiguous on and off, a second run, tolerance and softness by distance and by channel, 16-bit and gray images, the color profile and resolution kept, an image read at another size, linked images, refusals and bad params, and decoded pixels reused across preview steps and released at OK and Cancel), `addons::image::tests::remove_background_previews_cancels_and_runs_on_ok` in `vectorcraft-ui-egui` and `command_sweep`. Commands: `docs/mcp.md` › Image Tools add-on. Since 2026-11-12 a selected image also offers Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar, where the reference app offers it (<https://community.adobe.com/announcements-651/ai-powered-image-editing-features-in-illustrator-1624061>); a click runs it at once with the defaults, as one undo step (tests `canvas::tests::the_task_bar_removes_a_selected_images_background` and `addons::image::tests::properties_and_the_control_bar_remove_the_background_at_once`).
|
||||
|
||||
## Color Effects add-on: Find Nearest Swatch (2026-11-01)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user