# Rebuilding the KlikGefixt HEIC worker

This directory contains the readable application wrapper sources used with
heic-to 1.6.6. The worker is a separate JavaScript asset: it receives
`{ file: File }` and replies with a transferable `ImageBitmap` or an error.
The client helper owns cancellation, queueing, timeouts and JPEG encoding.

The unmodified heic-to JavaScript sources are supplied separately in
`../heic-to-1.6.6-sources.tar.gz`. Pinned C++ decoder sources, full license
texts and checksums are linked from `../heic-to-1.6.6-source-manifest.json`.

To build an interface-compatible worker:

1. Install Node.js and npm.
2. In this directory, run `npm install` and `npm run build`.
3. The resulting `dist/heic-conversion.worker.js` can replace the deployed
   `assets/heic-conversion.worker-<build-hash>.js` asset in a local or hosted
   copy of the site. Keep the original asset URL so the client helper loads it.

To rebuild with a modified library, extract the supplied heic-to source
archive, apply your modifications and follow that package's README and
`esbuild.mjs` build instructions. Then run `npm install /path/to/heic-to-1.6.6`
here followed by `npm run build`. This relinks the wrapper with your local
library copy without changing the worker's message interface.

This recipe rebuilds the independently delivered HEIC worker. It does not
reproduce the website's unrelated pages or server functions. Neither source
archive contains credentials, customer records or uploaded photos.

The wrapper source snapshot is provided for inspecting, modifying, rebuilding
and relinking this worker, including for debugging modifications to the LGPL
library. You may copy, modify and redistribute these wrapper files for those
purposes. Third-party library licenses and notices remain applicable.
