# libheif (WebAssembly) for HEIC/HEIF decoding

- `libheif-bundle.mjs`: `libheif-wasm/libheif-bundle.mjs` from the npm package
  [libheif-js](https://www.npmjs.com/package/libheif-js) 1.23.5, unmodified. It is not
  in the repo (about 2 MB): `web/build.sh` downloads it into `web/.cache/`, checks
  its SHA-256 and copies it into `web/dist/`. It is the
  Emscripten build of libheif (1.23.x) with the WebAssembly binary embedded, an ES module whose default
  export creates the module. It is loaded lazily, only when a HEIC file needs decoding.
- Licence: libheif is LGPL-3.0, see `LICENSE-libheif.txt` (the licence file shipped with
  the package). The libheif-js wrapper is also LGPL-3.0, see `LICENSE-libheif-js.txt`.
- Source code: libheif https://github.com/strukturag/libheif ;
  libheif-js https://github.com/catdad-experiments/libheif-js (tag for 1.23.5; the
  build scripts there fetch and compile the libheif source).
  The bundle can be rebuilt from those sources;
  it is a separate module, so a rebuilt copy can be swapped in.
