Update index.mjs

This commit is contained in:
lowlighter
2021-04-08 22:50:50 +02:00
parent 2207c51755
commit 4854779be4

View File

@@ -27,7 +27,7 @@
return {x, y, width, height} return {x, y, width, height}
}, selector) }, selector)
const [buffer] = await imports.record({page, ...clip, frames:1, background}) const [buffer] = await imports.record({page, ...clip, frames:1, background})
const screenshot = await (await imports.jimp.read(Buffer.from(buffer.split(",").pop(), "base64"))).resize(454, imports.jimp.AUTO) const screenshot = await (await imports.jimp.read(Buffer.from(buffer.split(",").pop(), "base64"))).resize(Math.min(454, clip.width), imports.jimp.AUTO)
await browser.close() await browser.close()
//Results //Results