diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs index bd4e9d2c7..e39de4ba8 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/workflow/cut.rs @@ -53,6 +53,9 @@ fn cut_processed_image_blocking( .map_err(|e| format!("读取处理图失败:{e}"))? .to_rgba8(); let normalized = normalize_binding_area(&image, *area)?; + if normalized.transparent { + return Err("分离区域没有可见像素".to_string()); + } let original_area = *area; let normalized_area = normalized.area; app_log!(