kleisauke / wasm-vips

libvips for the browser and Node.js, compiled to WebAssembly with Emscripten.
https://kleisauke.github.io/wasm-vips/
MIT License
519 stars 26 forks source link

`heifsave` is not defined #44

Closed saschanaz closed 1 year ago

saschanaz commented 1 year ago
import Vips from 'wasm-vips';

const vips = await Vips();

let im = vips.Image.newFromFile('test.4.jpg');
im.heifsave('testoutput.avif');

This fails on wasm-vips 0.0.4, perhaps some build flag is missing?

atjn commented 1 year ago

HEIF/AVIF is not supported in v0.0.4. It should work just fine when v0.0.5 is released.

For my projects, I have manually compiled wasm-vips with HEIF support, so I can keep working while waiting for an official release. Feel free to copy the custom release from my repository: https://github.com/atjn/easy-web-app-builder/blob/cbdf3b27e45c56b66324fdb393f69558e07bb4ed/wasm-vips-0.0.4%2Bb24ca0b.tgz

You can install the zip file directly by running npm install wasm-vips-0.0.4+b24ca0b.tgz , and you can even tell NPM to bundle this custom release with your project when you release new versions.

saschanaz commented 1 year ago

Awesome, thanks! I'll close this then 👍

kleisauke commented 1 year ago

v0.0.5 now available.