Commit Graph
18 Commits
Author SHA1 Message Date
InpaintRegionEditor Dev 4d528fff8e docs: 更新 HANDOFF.md,添加蒙版编辑功能说明和技术实现细节 2026-03-03 15:17:39 +08:00
InpaintRegionEditor Dev a4f8f78a0e feat: Photopea 蒙版编辑功能 + 修复 RGB 被掏窟窿问题
- 新增 Photopea 蒙版编辑模式(双图层:参考图像 + 蒙版层)
- 使用 channel=rgb 和 channel=a 分离加载,绑过 Canvas premultiplied alpha 问题
- UPNG.js 集成,保存时保留 Alpha=0 的 RGB 数据
- 支持羽化效果(半透明蒙版)
- 修复蒙版边界框检测:alpha < 255 都计入边界
- 右键菜单分离:编辑图像 / 编辑蒙版
2026-03-03 15:16:21 +08:00
InpaintRegionEditor Dev 027cf58da5 docs: Photopea 蒙版编辑方案设计文档 2026-03-03 12:56:41 +08:00
InpaintRegionEditor Dev 41d3313f61 docs: 更新开发日志和变更记录 2026-03-03 12:13:54 +08:00
InpaintRegionEditor Dev e91c014c03 feat: 支持 Ctrl+V 粘贴图片
- 添加全局粘贴事件监听(捕获阶段)
- 阻止系统创建新 LoadImage 节点
- 只处理当前选中的 InpaintRegionEditor 节点
2026-03-03 12:12:58 +08:00
InpaintRegionEditor Dev da3b913317 feat: 选区调整大小 + 光标变化 + 图像尺寸显示
- 支持拖动边缘/角落调整选区大小
- 光标根据位置变化:移动(grab)、调整大小(箭头)
- 边缘检测阈值优化(不超过选区15%)
- 图像左下角显示原图尺寸
- 选区约束:框住蒙版 + 不超出边界
2026-03-03 11:31:48 +08:00
InpaintRegionEditor Dev 1c0876580c docs: 更新开发日志和变更记录 2026-03-03 10:51:37 +08:00
InpaintRegionEditor Dev fec62d7758 feat: 选区约束 + MaskEditor 集成
- 选区约束:必须框住蒙版且不能超出图像边界
- 添加右键菜单 Open in MaskEditor 功能
- 使用 app.extensionManager.command.execute() 调用系统命令
- 统一 constrainRegion() 函数处理所有选区约束逻辑
- 移除红色蒙版区域显示(真实蒙版已在图像上显示)
2026-03-03 10:50:41 +08:00
InpaintRegionEditor Dev 23c748bcf0 feat: 自定义图像渲染 + 选区框绘制 + 拖动功能
主要更改:
- 重写前端 extension.js,完全自己控制图像渲染
- 去掉 nodes.py 的 image_upload,避免双图像问题
- 实现选区框绘制(橙色)+ 遮罩区域显示(红色)
- 实现选区框拖动功能
- 修复 onMouseDown 参数格式: (e, pos, canvas)
- 更新文档和开发日志
2026-03-02 22:31:54 +08:00
InpaintRegionEditor Dev 59b8ea0c56 debug: Add detailed logging for mask export
- Log each step of mask detection
- Log channel list from Photopea
- Log success/failure at each step
- Helps identify where export fails
2026-02-27 20:56:03 +08:00
InpaintRegionEditor Dev d0c835700d fix: Properly export layer mask from Photopea
- Use Photopea's native layer mask feature
- Users can: Layer > Layer Mask > Reveal All
- Draw mask with brush (black/white)
- Apply feathering via Properties panel
- Export mask correctly from Mask channel
2026-02-27 20:47:25 +08:00
InpaintRegionEditor Dev a5eb559df5 fix: Use selection instead of layer mask for simpler workflow
- Changed from layer mask to selection-based mask export
- Faster execution, no timeout issues
- Simpler user workflow: use selection tool (M) to draw mask area
- Updated hints to reflect selection-based workflow
2026-02-27 20:32:40 +08:00
InpaintRegionEditor Dev 7c2b031dfd fix: Auto-close after save, single save button
- Auto-close modal 300ms after successful save
- Single 'Save Image and Mask' button (export layer mask)
- User draws mask using Photopea's built-in layer mask tools
- Simplified code structure
2026-02-27 20:15:49 +08:00
InpaintRegionEditor Dev ef08bc1b91 fix: Separate save buttons, fix DOM error on close
- Split into two buttons: 'Save Image' and 'Save Mask from Selection'
- Add isOpen flag to prevent DOM operations after modal close
- Simplify mask export: create mask directly from selection
- Better error handling and status messages
2026-02-27 20:09:43 +08:00
InpaintRegionEditor Dev 1e47352db1 docs: Add professional README, LICENSE, and CHANGELOG
- README.md: Standard format with badges, installation, usage
- LICENSE: MIT license
- CHANGELOG.md: Keep a Changelog format
2026-02-27 19:59:15 +08:00
InpaintRegionEditor Dev f01500de3d Add .gitignore, remove pycache from tracking 2026-02-27 19:56:21 +08:00
InpaintRegionEditor Dev 73c5ba7a1f Add development changelog 2026-02-27 19:56:03 +08:00
InpaintRegionEditor Dev cf0f8e404a Initial commit: Photopea integration for inpaint editing 2026-02-27 19:55:26 +08:00