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({
|
? await applyRawAlphaToImage({
|
||||||
alphaMaskRaw: await sharp(repairMaskBuffer, { failOn: "none" })
|
alphaMaskRaw: await sharp(repairMaskBuffer, { failOn: "none" })
|
||||||
.resize(generatedWidth, generatedHeight, { fit: "fill" })
|
.resize(generatedWidth, generatedHeight, { fit: "fill" })
|
||||||
.removeAlpha()
|
.ensureAlpha()
|
||||||
.extractChannel(0)
|
.extractChannel(3)
|
||||||
.blur(Math.max(4, Math.round(Math.min(generatedWidth, generatedHeight) * 0.006)))
|
.blur(Math.max(4, Math.round(Math.min(generatedWidth, generatedHeight) * 0.006)))
|
||||||
.raw()
|
.raw()
|
||||||
.toBuffer(),
|
.toBuffer(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user