Add advanced editing features: layers, background removal, smart selection

Backend:
- Add /tools router with background removal, smart select, color select
- Add rembg dependency for AI background removal
- Add layer management API (list, flatten)
- Fix transparency preservation in blend_patch (veil collapse fix)
- Preserve alpha channel when reverting/resetting images

Frontend:
- Add AdvancedTools panel with background removal, smart select, color select
- Add Layers panel with drag-to-reorder, visibility toggle, flatten
- Add toolsApi for new backend endpoints
- Make right panel scrollable for additional controls

This adds "Photoshop light" capabilities:
- Remove background and create layer
- Smart object selection (click to select)
- Color selection with tolerance
- Layer system with compositing
This commit is contained in:
Claude
2026-01-25 15:20:11 +00:00
parent 7a86d53c88
commit 909bb41f8a
12 changed files with 1166 additions and 14 deletions
+2 -1
View File
@@ -5,7 +5,7 @@ from contextlib import asynccontextmanager
from app.config import settings
from app.database import init_db
from app.routers import projects, edits, images, patches, generate
from app.routers import projects, edits, images, patches, generate, tools
@asynccontextmanager
@@ -37,6 +37,7 @@ app.include_router(edits.router)
app.include_router(images.router)
app.include_router(patches.router)
app.include_router(generate.router)
app.include_router(tools.router)
@app.get("/")