Fix detail stitch long preview format
This commit is contained in:
parent
a3a41ef6e6
commit
5f90dbde67
@ -126,7 +126,7 @@ function buildReferenceFetchUrl(url: string): string {
|
|||||||
return buildImageProxyUrl(url, {
|
return buildImageProxyUrl(url, {
|
||||||
width: PREVIEW_MAX_WIDTH,
|
width: PREVIEW_MAX_WIDTH,
|
||||||
quality: 82,
|
quality: 82,
|
||||||
format: "webp",
|
format: "jpeg",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,14 +303,15 @@ async function prepareStitch(params: {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.composite(compositeItems)
|
.composite(compositeItems)
|
||||||
.webp({
|
.jpeg({
|
||||||
quality: 76,
|
quality: 76,
|
||||||
effort: 4,
|
mozjpeg: true,
|
||||||
|
progressive: true,
|
||||||
})
|
})
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
|
|
||||||
const upload = await uploadFile(
|
const upload = await uploadFile(
|
||||||
`detail-stitch-preview-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.webp`,
|
`detail-stitch-preview-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.jpg`,
|
||||||
bufferToArrayBuffer(previewBuffer),
|
bufferToArrayBuffer(previewBuffer),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user