Skip to content

Conversation

@DustyShoe
Copy link
Contributor

Summary

This PR introduces a new feature: Extract Masked region as Raster Layer.

The feature allows users to extract the portion of all visible raster layers that falls within the painted Inpaint Mask. The extracted region is composited and added as a new raster layer. Compared to my previous attempt, is not limited to bbox and uses mask layer bounds.

The new raster layer is currently created at the top of the raster layer stack.
In an ideal workflow, it could appear directly above the active raster layer, but Invoke currently supports only one active raster layer at a time. Changing this behavior may introduce unnecessary complexity; maintainers may consider it separately.

Related Issues / Discussions

QA Instructions

  1. Generate or import an image into the canvas so that raster layers are present.

  2. Add an Inpaint Mask layer and mask the region you would like to extract.

  3. In the Layer Panel or on masked area, right-click the Inpaint Mask layer to open its context menu.

  4. Select Extract Region.

  5. Verify that:

  • The new layer contains only the composited pixel data within the painted mask region.
  • Colors and transparency match the masked area.
  • No existing layers are modified.
  • No console errors occur.
  1. Test with:
  • multiple raster layers,
  • small and large painted mask regions,
  • different zoom/crop states.

Merge Plan

This feature is self-contained and should not introduce merge conflicts.
It reuses existing Invoke canvas and image manipulation infrastructure.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Nov 24, 2025
@DustyShoe DustyShoe changed the title Feature/add extract masked area feature v2 Feature(UI): add extract masked area from raster layers Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant