fix: use alpha channel for product lock repair mask
This commit is contained in:
parent
e67aab87c5
commit
0add599427
@ -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(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user