fix: use alpha channel for product lock repair mask

This commit is contained in:
134 2026-07-08 00:55:36 +08:00
parent e67aab87c5
commit 0add599427

View File

@ -3361,8 +3361,8 @@ async function applyScaleAdjustProductLockCompositeToImages(params: {
? await applyRawAlphaToImage({
alphaMaskRaw: await sharp(repairMaskBuffer, { failOn: "none" })
.resize(generatedWidth, generatedHeight, { fit: "fill" })
.removeAlpha()
.extractChannel(0)
.ensureAlpha()
.extractChannel(3)
.blur(Math.max(4, Math.round(Math.min(generatedWidth, generatedHeight) * 0.006)))
.raw()
.toBuffer(),