# Third-Party Notices

## MozJPEG / libjpeg-turbo

The native JPEG WebAssembly codec included in this package is built from
MozJPEG 4.1.5, which is based on libjpeg-turbo and the Independent JPEG Group's
JPEG software.

This software is based in part on the work of the Independent JPEG Group.

libjpeg-turbo is covered by compatible BSD-style open source licenses: the IJG
License for code inherited from libjpeg, the Modified 3-clause BSD License for
libjpeg-turbo code and build system portions, and the zlib License for SIMD
extensions.

### Modified 3-Clause BSD License

Copyright (C)2009-2023 D. R. Commander. All Rights Reserved.
Copyright (C)2015 Viktor Szathmary. All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
- Neither the name of the libjpeg-turbo Project nor the names of its
  contributors may be used to endorse or promote products derived from this
  software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

### IJG License Notice

The authors make NO WARRANTY or representation, either express or implied, with
respect to this software, its quality, accuracy, merchantability, or fitness for
a particular purpose. This software is provided "AS IS", and you, its user,
assume the entire risk as to its quality and accuracy.

This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding. All
Rights Reserved except as specified below.

Permission is hereby granted to use, copy, modify, and distribute this software
or portions thereof for any purpose, without fee, subject to these conditions:

1. If any part of the source code for this software is distributed, then the IJG
   README file must be included, with its copyright and no-warranty notice
   unaltered; and any additions, deletions, or changes to the original files
   must be clearly indicated in accompanying documentation.
2. If only executable code is distributed, then the accompanying documentation
   must state that "this software is based in part on the work of the
   Independent JPEG Group".
3. Permission for use of this software is granted only if the user accepts full
   responsibility for any undesirable consequences; the authors accept NO
   LIABILITY for damages of any kind.

## AVIF and HEIC codecs

`avif-decoder.wasm` and `avif-encoder.wasm` statically link libavif 1.4.2
(BSD-2-Clause) and the corresponding decode/encode portion of libaom 3.15.2
(BSD-2-Clause and AOM patent license). `heic-decoder.wasm` links libheif 1.23.6
and libde265 1.1.3 (both LGPL-3.0-or-later). `heic-encoder.wasm` links libheif
and Kvazaar 2.3.2 (BSD-3-Clause).
Their complete license texts are included in `licenses/`.

The package includes its native adapters and build scripts. The pinned upstream
source URLs and SHA-256 checksums are in `scripts/build-container-wasm.ts`.
That script downloads sources, applies the documented one-frame AVIF sequence
patch, and rebuilds the four independently replaceable WASM modules. Consumers may modify and
relink these components; reverse engineering for debugging such modifications
is permitted under the applicable licenses. See README for build prerequisites.

## GIF, quantization, and resize comparison

`gif.wasm` uses gif 0.14.2 (MIT/Apache-2.0) and exoquant 0.2.0 (MIT).
`png.wasm` uses png 0.18.1 (MIT/Apache-2.0) and exoquant.
The demo-only benchmark uses fast_image_resize 5.5.0 (MIT/Apache-2.0);
its WASM is not distributed in this npm package. Complete upstream notices are in
`licenses/`. Locked transitive versions are recorded in `native/raster/Cargo.lock`.
The resize implementation is used by the internal benchmark; production resizing
continues to use Canvas.

## Rust dependencies

The BMP and shared GIF/PNG raster build manifests and exact dependency versions are
included under `native/`. Verbatim upstream license and copyright notices for
all locked registry dependencies (including build dependencies) are included
under `licenses/rust/<crate>-<version>/`.

| Component | Version | License |
|-----------|---------|---------|
| adler2 | 2.0.1 | 0BSD OR MIT OR Apache-2.0 |
| autocfg | 1.5.1 | Apache-2.0 OR MIT |
| bitflags | 2.11.1 | MIT OR Apache-2.0 |
| bitflags | 2.13.2 | MIT OR Apache-2.0 |
| cfg-if | 1.0.5 | MIT OR Apache-2.0 |
| crc32fast | 1.5.0 | MIT OR Apache-2.0 |
| crc32fast | 1.5.2 | MIT OR Apache-2.0 |
| document-features | 0.2.12 | MIT OR Apache-2.0 |
| exoquant | 0.2.0 | MIT |
| fast_image_resize | 5.5.0 | MIT OR Apache-2.0 |
| fdeflate | 0.3.7 | MIT OR Apache-2.0 |
| flate2 | 1.1.10 | MIT OR Apache-2.0 |
| flate2 | 1.1.9 | MIT OR Apache-2.0 |
| gif | 0.14.2 | MIT OR Apache-2.0 |
| litrs | 1.0.1 | MIT OR Apache-2.0 |
| miniz_oxide | 0.8.9 | MIT OR Zlib OR Apache-2.0 |
| miniz_oxide | 0.9.1 | MIT OR Zlib OR Apache-2.0 |
| num-traits | 0.2.19 | MIT OR Apache-2.0 |
| png | 0.18.1 | MIT OR Apache-2.0 |
| proc-macro2 | 1.0.107 | MIT OR Apache-2.0 |
| quote | 1.0.47 | MIT OR Apache-2.0 |
| simd-adler32 | 0.3.10 | MIT |
| simd-adler32 | 0.3.9 | MIT |
| syn | 3.0.9 | MIT OR Apache-2.0 |
| thiserror | 2.0.21 | MIT OR Apache-2.0 |
| thiserror-impl | 2.0.21 | MIT OR Apache-2.0 |
| unicode-ident | 1.0.27 | (MIT OR Apache-2.0) AND Unicode-3.0 |
| weezl | 0.1.12 | MIT OR Apache-2.0 |
| zlib-rs | 0.6.8 | Zlib |

## libwebp

The native WebP WebAssembly codec included in this package is built from
libwebp 1.6.0.

Copyright (c) 2010, Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
- Neither the name of Google nor the names of its contributors may be used to
  endorse or promote products derived from this software without specific prior
  written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
