createImageBitmap support
Opened this issue · 2 comments
RReverser commented
It would be great to support the standard createImageBitmap
which async utility a lot like custom loadImage
provided by this library, but with more control over rasterization.
jimmywarting commented
👍 Fully agree, i think the api should be more aligned with OffscrenCanvas and how it works in web workers.
import fs from 'node:fs'
const blob = await fs.openAsBlob(path)
const canvas = new OffscreenCanvas(width, height)
const bitmap = await createImageBitmap(blob)
const result = await canvas.convertToBlob(options)
jimmywarting commented
I also think that the Image
class should eventually be removed and deprecated. And everybody should only use the createImageBitmap
that way you could also remove simple-get
which i do not think belongs in here.