Paper in Place: HEIC component sources and replacement Upstream origins (unmodified archives alongside this file): https://registry.npmjs.org/heic-to/-/heic-to-1.6.7.tgz https://github.com/strukturag/libheif/tree/v1.23.7 https://github.com/strukturag/libde265/releases/tag/v1.0.16 The exact shipped decoder JavaScript is in the heic-to archive: package/src/lib/libheif-without-unsafe-eval.js. Its runtime reports libheif 1.23.7. heic-to documents libde265 1.0.16 in its decoder build instructions. We have not modified this decoder. Our changes are a cancellable dedicated worker and conservative input preflight; their full editable sources accompany this file. These adapter sources are licensed LGPL-3.0-or-later. The application interface source is also supplied to permit adaptation to a replacement worker. To replace the decoder and rebuild this worker without the rest of the app: 1. Create a working directory with src/ and node_modules/heic-to/. 2. Extract the heic-to package archive into node_modules/heic-to/, removing its initial package/ path component. 3. Save heic-worker.js.txt and heic-preflight.js.txt as src/heic-worker.js and src/heic-preflight.js; save heic-orientation.js.txt as src/heic-orientation.js. Modify these or replace the decoder module. 4. With Node.js and npm installed, run: npx --yes --package=esbuild@0.25.4 esbuild src/heic-worker.js --bundle --format=esm --platform=browser --external:fs --external:path --external:crypto --outfile=heic-worker.js 5. Serve a local copy of the site. Replace its assets/heic-worker-*.js contents with the new output, retaining the old filename so the app's Worker URL still resolves. No checksum or signature check is imposed. Alternatively modify heic-processing.js to use your worker URL and rebuild the application with Vite. The worker protocol is described below. Worker interface: input: a transferable ArrayBuffer containing one HEIC image. success: {bytes: ArrayBuffer containing PNG, width: number, height: number}. failure: {error: string}. One request per worker; terminate after completion. Both the processor and worker run preflight. To alter supported formats, update the provided preflight source on both sides as needed. To rebuild the decoder from the supplied C/C++ source instead: - Install Emscripten, CMake, make and autotools. See heic-to README.md and libheif build-emscripten.sh for upstream prerequisites and platform notes. - Extract libheif-1.23.7, create buildjs/ inside it and copy the supplied libde265-1.0.16.tar.gz there (the build script reuses this local archive). - From buildjs/, run: LIBDE265_VERSION=1.0.16 USE_UNSAFE_EVAL=0 USE_WASM=0 USE_ES6=1 ../build-emscripten.sh .. - On macOS configure CORES and EMSDK/llvm-nm as described upstream. - The resulting ES module must default-export the synchronous libheif factory; use it in place of libheif-without-unsafe-eval.js, then rebuild the worker as above. Other codecs are not enabled by the upstream defaults. Toolchain versions affect emitted bytes. The included generated decoder is the exact one distributed; a byte-for-byte C/C++ rebuild is not claimed. The rest of the application can continue using the replacement through this interface. LGPL permissions, including debugging modified components, are not restricted by this website.