From 5d3cf16bace7bab9dfffaddbf8ce96582ba8d416 Mon Sep 17 00:00:00 2001 From: InpaintRegionEditor Dev Date: Tue, 3 Mar 2026 20:20:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=BD=BF=E7=94=A8=20channel=3Drgb=20?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=A2=AB=E6=8E=8F=E7=AA=9F=E7=AA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/extension.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/extension.js b/web/extension.js index b423c35..2c10314 100644 --- a/web/extension.js +++ b/web/extension.js @@ -173,8 +173,11 @@ async function loadImg() { if (m) { filename = m[1].trim(); type = m[2]; } const idx = filename.lastIndexOf("/"); if (idx !== -1) { subfolder = filename.substring(0, idx); filename = filename.substring(idx + 1); } - let url = "/view?filename=" + encodeURIComponent(filename) + "&type=" + encodeURIComponent(type); + + // 使用 channel=rgb 获取完整 RGB(避免被"掏窟窿") + let url = "/view?filename=" + encodeURIComponent(filename) + "&type=" + encodeURIComponent(type) + "&channel=rgb"; if (subfolder) url += "&subfolder=" + encodeURIComponent(subfolder); + const resp = await fetch(url); if (!resp.ok) throw new Error("HTTP " + resp.status); await PhotopeaBridge.openImage(await resp.blob());