Add Remove Background feature using AI (rembg)

Frontend:
- Added "Remove Background (AI)" to Image menu
- Created remove_background.js module with dialog options
- Added removeBackground method to API service

Backend:
- Added /tools/remove-background-base64 endpoint for miniPaint frontend
- Uses rembg library for AI-powered background removal

Features:
- Automatically detects main subject and removes background
- Option to create as new layer or replace current
- Enables transparency mode after removal
- Works with any image layer
This commit is contained in:
Claude
2026-01-27 00:47:22 +00:00
parent f650ec3019
commit 22d9f767a8
4 changed files with 221 additions and 0 deletions
+8
View File
@@ -283,6 +283,14 @@ const menuDefinition = [
name: 'Histogram',
ellipsis: true,
target: 'image/histogram.histogram'
},
{
divider: true
},
{
name: 'Remove Background (AI)',
ellipsis: true,
target: 'image/remove_background.remove_background'
}
]
},