Image tool licenses and source
HEIC conversion uses heic-to 1.6.6 by Hopper Gee, incorporating libheif 1.23.6 and libde265 1.0.16. These components are distributed under the GNU Lesser General Public License, version 3 (or later where specified by the component). They are provided without warranty. The source archives and license texts below accompany this distribution.
- heic-to 1.6.6: license · corresponding source and build instructions · upstream
- libheif 1.23.6, copyright Dirk Farin and contributors: license · source · upstream
- libde265 1.0.16, copyright Dirk Farin and contributors: license · source · upstream
- ZIP creation uses fflate 0.8.3 by Arjun Barrett, MIT license: license · upstream
Replacing or rebuilding the decoder
The upstream libraries are used without source modifications. The HEIC decoder is delivered in a separate assets/heic.worker-*.js module, loaded on demand. The heic-to source README describes building the decoder with Emscripten, libheif 1.23.6 and LIBDE265_VERSION=1.0.16 USE_WASM=0. Build heic-to's next entry, substitute that module in src/lib/tools/heic.worker.ts, and run the application build to use a modified library. The wrapper receives a File and JPEG quality and returns a Blob or an error. You may modify and reverse engineer these library components to debug such modifications under their licenses.
Download the complete worker wrapper source. To create a standalone replacement, save it as heic.worker.ts, install heic-to@1.6.6 and esbuild, then run npx esbuild heic.worker.ts --bundle --format=esm --platform=browser --outfile=replacement-worker.js. Substitute your modified heic-to package before bundling, then replace the deployed assets/heic.worker-*.js file with that output. Clear the site's service-worker cache to load the replacement.