let sharp = await npm("sharp")
let [file] = await arg({
placeholder: "Drop an image",
drop: true,
ignoreBlur: true,
})
await arg("Rotate:", async input => {
let rotate = 0
try {
rotate = parseInt(input || 0, 10)
} catch {}
let buffer = await sharp(file.path)
.rotate(rotate)
.toBuffer()
return `
<img style="height:10rem" src="data:image/jpg;base64,${buffer.toString(
"base64"
)}" alt="">
`
})