libheif-js vendor copy for OnDevice ===================================== This folder is a verbatim copy of the wasm build from the npm package libheif-js@1.23.5 (LGPL-3.0). The site loads these files at runtime from a Web Worker. They are not concatenated into the rest of the app. Included files -------------- - libheif.js SHA-256 376c0bb483c23ac458cd22d718074693748ea75eddc3e4929353d4153e365a2e - libheif.wasm SHA-256 184d3d20f8323877f13e9f5254f9c6a0ce272c9a3a2f823b0b2bcd2ee9f73f80 - LICENSE LGPL-3.0 and related texts as shipped in libheif-wasm - LICENSE-libheif-js-wrapper.txt LGPL-3.0 text for the npm wrapper Versions -------- - npm package: libheif-js@1.23.5 https://www.npmjs.com/package/libheif-js https://github.com/catdad-experiments/libheif-js - The package keeps the major.minor version of upstream libheif. Corresponding source: - https://github.com/strukturag/libheif (libheif, LGPL-3.0) - https://github.com/strukturag/libde265 (HEVC decoder, LGPL-3.0) - https://github.com/catdad-experiments/libheif-js How this site loads the library ------------------------------- /workers/heic-worker.js calls importScripts on /vendor/libheif-js/libheif.js and passes locateFile so that libheif.wasm is fetched from this same folder. Required interface if you replace the files ------------------------------------------- Keep the same file names, or update the worker and this document together. A replacement build must provide: - a global function libheif(options) (Emscripten factory) that accepts locateFile, onRuntimeInitialized, and onAbort - new module.HeifDecoder() - decoder.decode(Uint8Array) → list of images - per image: get_width(), get_height(), display({data,width,height}, cb), free() - optional: module.heif_context_free(handle) and decoder.decoder You may modify the library for your own use and reverse-engineer it to debug those modifications. Serving your own copies of these two files in this folder is enough to replace the Linked Version on a saved copy of the site. This file is generated by scripts/copy-vendor.mjs.