mifi / editly

Slick, declarative command line video editing & API
MIT License
4.64k stars 295 forks source link

Fabric js image don't render #185

Closed Inaztm closed 2 years ago

Inaztm commented 2 years ago

Load image:

const createImage = (fabric, imagePath) => new Promise((resolve, reject) => {
    fabric.Image.fromURL(imagePath, resolve)
})

const imagePath = 'file://' + path.join(__dirname, `../frames/frame-${frame}.png`)
const image = await createImage(fabric, imagePath)
canvas.add(image)

But image dont render

consle output image object:

klass {
  filters: [],
  cacheKey: 'texture520',
  _element: HTMLImageElement {},
  _originalElement: HTMLImageElement {},
  width: 1920,
  height: 1080
}