diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index a29034945..000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-version: 2.1
-
-workflows:
- build:
- jobs:
- - linux-arm64-glibc-node-18:
- filters:
- tags:
- only: /^v.*/
- - linux-arm64-musl-node-18:
- filters:
- tags:
- only: /^v.*/
- - linux-arm64-glibc-node-20:
- filters:
- tags:
- only: /^v.*/
- - linux-arm64-musl-node-20:
- filters:
- tags:
- only: /^v.*/
-
-jobs:
- linux-arm64-glibc-node-18:
- resource_class: arm.medium
- machine:
- image: ubuntu-2204:current
- steps:
- - checkout
- - run: |
- sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp arm64v8/debian:bullseye
- sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl fonts-noto-core"
- sudo docker exec sharp sh -c "mkdir -p /etc/apt/keyrings"
- sudo docker exec sharp sh -c "curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg"
- sudo docker exec sharp sh -c "echo 'deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main' | tee /etc/apt/sources.list.d/nodesource.list"
- sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs"
- - run: sudo docker exec sharp sh -c "npm install --build-from-source"
- - run: sudo docker exec sharp sh -c "npm test"
- - run: |
- sudo docker exec sharp sh -c "npm run package-from-local-build"
- sudo docker exec sharp sh -c "npm pkg set \"optionalDependencies.@img/sharp-linux-arm64=file:./npm/linux-arm64\""
- sudo docker exec sharp sh -c "npm run clean"
- sudo docker exec sharp sh -c "npm install --ignore-scripts"
- sudo docker exec sharp sh -c "npm test"
- - run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"cd src && ln -s ../package.json && npx prebuild --upload=$prebuild_upload\" || true"
- linux-arm64-glibc-node-20:
- resource_class: arm.medium
- machine:
- image: ubuntu-2204:current
- steps:
- - checkout
- - run: |
- sudo docker run -dit --name sharp --workdir /mnt/sharp arm64v8/debian:bullseye
- sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl fonts-noto-core"
- sudo docker exec sharp sh -c "mkdir -p /etc/apt/keyrings"
- sudo docker exec sharp sh -c "curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg"
- sudo docker exec sharp sh -c "echo 'deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main' | tee /etc/apt/sources.list.d/nodesource.list"
- sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs"
- sudo docker exec sharp sh -c "mkdir -p /mnt/sharp"
- sudo docker cp . sharp:/mnt/sharp/.
- - run: sudo docker exec sharp sh -c "npm install --build-from-source"
- - run: sudo docker exec sharp sh -c "npm test"
- - run: |
- sudo docker exec sharp sh -c "npm run package-from-local-build"
- sudo docker exec sharp sh -c "npm pkg set \"optionalDependencies.@img/sharp-linux-arm64=file:./npm/linux-arm64\""
- sudo docker exec sharp sh -c "npm run clean"
- sudo docker exec sharp sh -c "npm install --ignore-scripts"
- sudo docker exec sharp sh -c "npm test"
- linux-arm64-musl-node-18:
- resource_class: arm.medium
- machine:
- image: ubuntu-2204:current
- steps:
- - checkout
- - run: |
- sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:18-alpine3.17
- sudo docker exec sharp sh -c "apk add build-base git python3 font-noto --update-cache"
- - run: sudo docker exec sharp sh -c "npm install --build-from-source"
- - run: sudo docker exec sharp sh -c "npm test"
- - run: |
- sudo docker exec sharp sh -c "npm run package-from-local-build"
- sudo docker exec sharp sh -c "npm pkg set \"optionalDependencies.@img/sharp-linuxmusl-arm64=file:./npm/linuxmusl-arm64\""
- sudo docker exec sharp sh -c "npm run clean"
- sudo docker exec sharp sh -c "npm install --ignore-scripts"
- sudo docker exec sharp sh -c "npm test"
- - run: "[[ -n $CIRCLE_TAG ]] && sudo docker exec --env prebuild_upload sharp sh -c \"cd src && ln -s ../package.json && npx prebuild --upload=$prebuild_upload\" || true"
- linux-arm64-musl-node-20:
- resource_class: arm.medium
- machine:
- image: ubuntu-2204:current
- steps:
- - checkout
- - run: |
- sudo docker run -dit --name sharp --workdir /mnt/sharp node:20-alpine3.18
- sudo docker exec sharp sh -c "apk add build-base git python3 font-noto --update-cache"
- sudo docker exec sharp sh -c "mkdir -p /mnt/sharp"
- sudo docker cp . sharp:/mnt/sharp/.
- - run: sudo docker exec sharp sh -c "npm install --build-from-source"
- - run: sudo docker exec sharp sh -c "npm test"
- - run: |
- sudo docker exec sharp sh -c "npm run package-from-local-build"
- sudo docker exec sharp sh -c "npm pkg set \"optionalDependencies.@img/sharp-linuxmusl-arm64=file:./npm/linuxmusl-arm64\""
- sudo docker exec sharp sh -c "npm run clean"
- sudo docker exec sharp sh -c "npm install --ignore-scripts"
- sudo docker exec sharp sh -c "npm test"
diff --git a/.cirrus.yml b/.cirrus.yml
index a0b1785b0..5a6fb8c59 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,5 +1,5 @@
freebsd_instance:
- image_family: freebsd-14-0-snap
+ image_family: freebsd-16-0-snap
task:
name: FreeBSD
@@ -9,9 +9,10 @@ task:
prerequisites_script:
- pkg update -f
- pkg upgrade -y
- - pkg install -y devel/git devel/pkgconf graphics/vips www/node20 www/npm
+ - pkg install -y devel/git devel/pkgconf graphics/vips www/node22 www/npm
- pkg-config --modversion vips-cpp
install_script:
- - npm install --build-from-source
+ - npm install
+ - npm run build
test_script:
- - npx mocha --no-config --spec=test/unit/io.js --timeout=30000
+ - node --test test/unit/io.js
diff --git a/.editorconfig b/.editorconfig
index 5760be583..62fb51fed 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,6 +7,4 @@ indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-
-[*.md]
-trim_trailing_whitespace = false
+max_line_length = 120
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index c806fc5e7..b65d48b98 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -6,8 +6,6 @@ Hello, thank you for your interest in helping!
Please create a [new issue](https://github.com/lovell/sharp/issues/new) containing the steps to reproduce the problem.
-If you're having installation problems, please include the output of running `npm install --verbose sharp`.
-
New bugs are assigned a `triage` label whilst under investigation.
## Submit a new feature request
@@ -16,7 +14,7 @@ If a [similar request](https://github.com/lovell/sharp/labels/enhancement) exist
it's probably fastest to add a comment to it about your requirement.
Implementation is usually straightforward if libvips
-[already supports](https://www.libvips.org/API/current/func-list.html)
+[already supports](https://www.libvips.org/API/current/function-list.html)
the feature you need.
## Submit a Pull Request to fix a bug
@@ -27,12 +25,11 @@ Please select the `main` branch as the destination for your Pull Request so your
Please squash your changes into a single commit using a command like `git rebase -i upstream/main`.
-To test C++ changes, you can compile the module using `npm install --build-from-source` and then run the tests using `npm test`.
+To test C++ changes, you can compile the module using `npm run build` and then run the tests using `npm test`.
## Submit a Pull Request with a new feature
Please add JavaScript [unit tests](https://github.com/lovell/sharp/tree/main/test/unit) to cover your new feature.
-A test coverage report for the JavaScript code is generated in the `coverage/lcov-report` directory.
Please also update the [TypeScript definitions](https://github.com/lovell/sharp/tree/main/lib/index.d.ts), along with the [type definition tests](https://github.com/lovell/sharp/tree/main/test/types/sharp.test-d.ts).
Where possible, the functional tests use gradient-based perceptual hashes
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 53b5e12db..cd6838590 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,10 +4,24 @@ on:
- pull_request
permissions: {}
jobs:
- github-runner:
+ lint:
permissions:
- contents: write
- name: ${{ matrix.platform }} - Node.js ${{ matrix.nodejs_version_major }} ${{ matrix.prebuild && '- prebuild' }}
+ contents: read
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v5
+ with:
+ node-version: "24"
+ - run: npm install --ignore-scripts
+ - run: npm run lint-cpp
+ - run: npm run lint-js
+ - run: npm run lint-types
+ build-native:
+ permissions:
+ contents: read
+ needs: lint
+ name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
@@ -20,7 +34,7 @@ jobs:
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: linux-x64
- prebuild: true
+ package: true
- os: ubuntu-24.04
container: rockylinux:8
nodejs_arch: x64
@@ -37,7 +51,7 @@ jobs:
container: node:18-alpine3.17
nodejs_version_major: 18
platform: linuxmusl-x64
- prebuild: true
+ package: true
- os: ubuntu-24.04
container: node:20-alpine3.18
nodejs_version_major: 20
@@ -46,66 +60,79 @@ jobs:
container: node:22-alpine3.20
nodejs_version_major: 22
platform: linuxmusl-x64
- - os: macos-13
+ - os: ubuntu-24.04-arm
+ container: arm64v8/rockylinux:8
+ nodejs_arch: arm64
+ nodejs_version: "^18.17.0"
+ nodejs_version_major: 18
+ platform: linux-arm64
+ package: true
+ - os: ubuntu-24.04-arm
+ container: arm64v8/rockylinux:8
+ nodejs_arch: arm64
+ nodejs_version: "^20.3.0"
+ nodejs_version_major: 20
+ platform: linux-arm64
+ - os: macos-15-intel
nodejs_arch: x64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: darwin-x64
- prebuild: true
- - os: macos-13
+ package: true
+ - os: macos-15-intel
nodejs_arch: x64
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: darwin-x64
- - os: macos-13
+ - os: macos-15-intel
nodejs_arch: x64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: darwin-x64
- - os: macos-14
+ - os: macos-15
nodejs_arch: arm64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: darwin-arm64
- prebuild: true
- - os: macos-14
+ package: true
+ - os: macos-15
nodejs_arch: arm64
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: darwin-arm64
- - os: macos-14
+ - os: macos-15
nodejs_arch: arm64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: darwin-arm64
- - os: windows-2019
+ - os: windows-2022
nodejs_arch: x86
nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10
nodejs_version_major: 18
platform: win32-ia32
- prebuild: true
- - os: windows-2019
+ package: true
+ - os: windows-2022
nodejs_arch: x86
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: win32-ia32
- - os: windows-2019
+ - os: windows-2022
nodejs_arch: x86
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: win32-ia32
- - os: windows-2019
+ - os: windows-2022
nodejs_arch: x64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: win32-x64
- prebuild: true
- - os: windows-2019
+ package: true
+ - os: windows-2022
nodejs_arch: x64
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: win32-x64
- - os: windows-2019
+ - os: windows-2022
nodejs_arch: x64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
@@ -115,7 +142,7 @@ jobs:
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: win32-arm64
- prebuild: true
+ package: true
- os: windows-11-arm
nodejs_arch: arm64
nodejs_version: "^22.9.0"
@@ -125,8 +152,8 @@ jobs:
- name: Dependencies (Rocky Linux glibc)
if: contains(matrix.container, 'rockylinux')
run: |
- dnf install -y gcc-toolset-11-gcc-c++ make git python3.12 fontconfig google-noto-sans-fonts
- echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH
+ dnf install -y gcc-toolset-14-gcc-c++ make git python3.12 fontconfig google-noto-sans-fonts
+ echo "/opt/rh/gcc-toolset-14/root/usr/bin" >> $GITHUB_PATH
- name: Dependencies (Linux musl)
if: contains(matrix.container, 'alpine')
run: apk add build-base git python3 font-noto --update-cache
@@ -137,100 +164,144 @@ jobs:
python-version: "3.12"
- name: Dependencies (Node.js)
if: "!contains(matrix.platform, 'linuxmusl')"
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v5
with:
node-version: ${{ matrix.nodejs_version }}
architecture: ${{ matrix.nodejs_arch }}
- - name: Checkout
- uses: actions/checkout@v4
- - name: Install
- run: npm install --build-from-source
- - name: Test
- run: npm test
- - name: Test packaging
- run: |
- npm run package-from-local-build
- npm pkg set "optionalDependencies.@img/sharp-${{ matrix.platform }}=file:./npm/${{ matrix.platform }}"
- npm run clean
- npm install --ignore-scripts
- npm test
- - name: Prebuild
- if: matrix.prebuild && startsWith(github.ref, 'refs/tags/')
- env:
- prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
+ - uses: actions/checkout@v4
+ - run: npm install
+ - run: npm run build
+ - run: npm run test-unit
+ - if: matrix.package
+ run: npm run package-from-local-build
+ - uses: actions/upload-artifact@v4
+ if: matrix.package
+ with:
+ name: ${{ matrix.platform }}
+ path: npm/${{ matrix.platform }}
+ retention-days: 1
+ if-no-files-found: error
+ build-linuxmusl-arm64:
+ permissions:
+ contents: read
+ needs: lint
+ name: "build-linuxmusl-arm64 [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
+ runs-on: ubuntu-24.04-arm
+ container:
+ image: ${{ matrix.container }}
+ volumes:
+ - /opt:/opt:rw,rshared
+ - /opt:/__e/node20:ro,rshared
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - container: node:18-alpine3.17
+ nodejs_version_major: 18
+ package: true
+ - container: node:20-alpine3.18
+ nodejs_version_major: 20
+ steps:
+ - name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757
+ shell: sh
run: |
- node -e "require('fs').cpSync('package.json', 'src/package.json')"
- cd src
- npx prebuild
- github-runner-qemu:
+ sed -i "/^ID=/s/alpine/NotpineForGHA/" /etc/os-release
+ apk add nodejs --update-cache
+ mkdir /opt/bin
+ ln -s /usr/bin/node /opt/bin/node
+ - name: Dependencies
+ run: apk add build-base git python3 font-noto --update-cache
+ - uses: actions/checkout@v4
+ - run: npm install
+ - run: npm run build
+ - run: npm run test-unit
+ - if: matrix.package
+ run: npm run package-from-local-build
+ - uses: actions/upload-artifact@v4
+ if: matrix.package
+ with:
+ name: linuxmusl-arm64
+ path: npm/linuxmusl-arm64
+ retention-days: 1
+ if-no-files-found: error
+ build-qemu:
permissions:
- contents: write
- name: ${{ matrix.platform }} - Node.js ${{ matrix.nodejs_version_major }} - prebuild
+ contents: read
+ needs: lint
+ name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] [package]"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- platform: linux-arm
- distro: bullseye
- run_on_arch: armv6
+ base_image: "balenalib/rpi-raspbian:bullseye"
nodejs_arch: armv6l
nodejs_hostname: unofficial-builds.nodejs.org
nodejs_version: "18.17.0"
nodejs_version_major: 18
- platform: linux-s390x
- distro: bullseye
- run_on_arch: s390x
+ base_image: "--platform=linux/s390x s390x/debian:bookworm"
nodejs_arch: s390x
nodejs_hostname: nodejs.org
nodejs_version: "18.17.0"
nodejs_version_major: 18
- platform: linux-ppc64
- distro: bullseye
- run_on_arch: ppc64le
+ base_image: "--platform=linux/ppc64le ppc64le/debian:bookworm"
nodejs_arch: ppc64le
nodejs_hostname: nodejs.org
nodejs_version: "18.17.0"
nodejs_version_major: 18
+ - platform: linux-riscv64
+ base_image: "--platform=linux/riscv64 riscv64/debian:trixie"
+ compiler_flags: "-march=rv64gc"
+ nodejs_arch: riscv64
+ nodejs_hostname: unofficial-builds.nodejs.org
+ nodejs_version: "20.19.5"
+ nodejs_version_major: 20
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3
with:
- arch: ${{ matrix.run_on_arch }}
- distro: ${{ matrix.distro }}
+ arch: none
+ distro: none
+ base_image: ${{ matrix.base_image }}
env: |
- prebuild_upload: "${{ startsWith(github.ref, 'refs/tags/') && secrets.GITHUB_TOKEN || '' }}"
+ CFLAGS: "${{ matrix.compiler_flags }}"
+ CXXFLAGS: "${{ matrix.compiler_flags }}"
run: |
apt-get update
apt-get install -y curl g++ git libatomic1 make python3 xz-utils
mkdir /opt/nodejs
curl --silent https://${{ matrix.nodejs_hostname }}/download/release/v${{ matrix.nodejs_version}}/node-v${{ matrix.nodejs_version}}-linux-${{ matrix.nodejs_arch }}.tar.xz | tar xJC /opt/nodejs --strip-components=1
export PATH=$PATH:/opt/nodejs/bin
- npm install --build-from-source
- npx mocha --no-config --spec=test/unit/io.js --timeout=30000
+ npm install
+ npm run build
+ node --test test/unit/io.js
npm run package-from-local-build
- npm pkg set "optionalDependencies.@img/sharp-${{ matrix.platform }}=file:./npm/${{ matrix.platform }}"
- npm run clean
- npm install --ignore-scripts
- npx mocha --no-config --spec=test/unit/io.js --timeout=30000
- [[ -n $prebuild_upload ]] && cd src && ln -s ../package.json && npx prebuild || true
- github-runner-emscripten:
+ - uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.platform }}
+ path: npm/${{ matrix.platform }}
+ retention-days: 1
+ if-no-files-found: error
+ build-emscripten:
permissions:
- contents: write
- name: wasm32 - prebuild
+ contents: read
+ needs: lint
+ name: "build-wasm32 [package]"
runs-on: ubuntu-24.04
- container: "emscripten/emsdk:4.0.6"
+ container: "emscripten/emsdk:4.0.18"
steps:
- - name: Checkout
- uses: actions/checkout@v4
+ - uses: actions/checkout@v4
- name: Dependencies
run: apt-get update && apt-get install -y pkg-config
- name: Dependencies (Node.js)
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v5
with:
node-version: "20"
- - name: Install
- run: emmake npm install --build-from-source
+ - run: npm install
+ - run: emmake npm run build
- name: Verify emscripten versions match
run: |
EMSCRIPTEN_VERSION_LIBVIPS=$(node -p "require('@img/sharp-libvips-dev-wasm32/versions').emscripten")
@@ -238,19 +309,48 @@ jobs:
echo "libvips built with emscripten $EMSCRIPTEN_VERSION_LIBVIPS"
echo "sharp built with emscripten $EMSCRIPTEN_VERSION_SHARP"
test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP"
- - name: Test
- run: emmake npm test
- - name: Test packaging
- run: |
- emmake npm run package-from-local-build
- npm pkg set "optionalDependencies.@img/sharp-wasm32=file:./npm/wasm32"
- npm run clean
- rm -rf node_modules/@img/sharp-linux-x64
- npm install --cpu=wasm32
- npm test
- - name: Prebuild
- if: startsWith(github.ref, 'refs/tags/')
- env:
- npm_config_nodedir: emscripten
- prebuild_upload: ${{ secrets.GITHUB_TOKEN }}
- run: cd src && ln -s ../package.json && emmake npx prebuild --platform=emscripten --arch=wasm32 --strip=0
+ - run: emmake npm run test-unit
+ - run: emmake npm run package-from-local-build
+ - uses: actions/upload-artifact@v4
+ with:
+ name: wasm32
+ path: npm/wasm32
+ retention-days: 1
+ if-no-files-found: error
+ release:
+ permissions:
+ contents: write
+ id-token: write
+ runs-on: ubuntu-24.04
+ needs:
+ - build-native
+ - build-linuxmusl-arm64
+ - build-qemu
+ - build-emscripten
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/download-artifact@v4
+ with:
+ path: npm
+ - name: Create npm workspace tarball
+ run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
+ - uses: actions/setup-node@v5
+ with:
+ node-version: '24'
+ - name: Create release notes
+ run: npm run package-release-notes
+ - name: Create GitHub release for tag
+ if: startsWith(github.ref, 'refs/tags/v')
+ uses: ncipollo/release-action@v1
+ with:
+ artifacts: npm-workspace.tar.xz
+ artifactContentType: application/x-xz
+ prerelease: ${{ contains(github.ref, '-rc') }}
+ makeLatest: ${{ !contains(github.ref, '-rc') }}
+ bodyFile: release-notes.md
+ - name: Publish platform-specific npm packages
+ if: startsWith(github.ref, 'refs/tags/v')
+ run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }}
+ - name: Publish sharp npm package
+ if: startsWith(github.ref, 'refs/tags/v')
+ run: npm publish --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }}
diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml
index f74916713..4db44a5b4 100644
--- a/.github/workflows/npm.yml
+++ b/.github/workflows/npm.yml
@@ -43,60 +43,60 @@ jobs:
runtime: bun
- name: darwin-x64-node-npm
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: node
package-manager: npm
- name: darwin-x64-node-pnpm
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: node
package-manager: pnpm
- name: darwin-x64-node-yarn
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: node
package-manager: yarn
- name: darwin-x64-node-yarn-pnp
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: node
package-manager: yarn-pnp
- name: darwin-x64-node-yarn-v1
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: node
package-manager: yarn-v1
- name: darwin-x64-deno
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: deno
- name: darwin-x64-bun
- runs-on: macos-13
+ runs-on: macos-15-intel
runtime: bun
- name: win32-x64-node-npm
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: node
package-manager: npm
- name: win32-x64-node-pnpm
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: node
package-manager: pnpm
- name: win32-x64-node-yarn
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: node
package-manager: yarn
- name: win32-x64-node-yarn-pnp
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: node
package-manager: yarn-pnp
- name: win32-x64-node-yarn-v1
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: node
package-manager: yarn-v1
- name: win32-x64-deno
- runs-on: windows-2019
+ runs-on: windows-2022
runtime: deno
steps:
- name: Install Node.js
if: ${{ matrix.runtime == 'node' }}
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v5
with:
node-version: 20
- name: Install pnpm
@@ -106,9 +106,9 @@ jobs:
version: 8
- name: Install Deno
if: ${{ matrix.runtime == 'deno' }}
- uses: denoland/setup-deno@v1
+ uses: denoland/setup-deno@v2
with:
- deno-version: v1.x
+ deno-version: v2.x
- name: Install Bun
if: ${{ matrix.runtime == 'bun' }}
uses: oven-sh/setup-bun@v2
@@ -117,7 +117,7 @@ jobs:
- name: Version
id: version
- uses: actions/github-script@v7
+ uses: actions/github-script@v8
with:
script: |
core.setOutput('semver', context.ref.replace('refs/tags/v',''))
@@ -185,7 +185,9 @@ jobs:
- name: Run with Deno
if: ${{ matrix.runtime == 'deno' }}
- run: deno run --allow-read --allow-ffi release.mjs
+ run: |
+ deno install
+ deno run --allow-env --allow-ffi --allow-read --allow-sys release.mjs
- name: Run with Bun
if: ${{ matrix.runtime == 'bun' }}
diff --git a/.gitignore b/.gitignore
index 6959cf624..82f73b3f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ package-lock.json
.firebase
.astro
docs/dist
+release-notes.md
diff --git a/.mocharc.jsonc b/.mocharc.jsonc
deleted file mode 100644
index 06df4ac9f..000000000
--- a/.mocharc.jsonc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "parallel": true,
- "slow": 1000,
- "timeout": 30000,
- "require": "./test/beforeEach.js",
- "spec": "./test/unit/*.js"
-}
diff --git a/.prebuildrc b/.prebuildrc
deleted file mode 100644
index 0a4ccd2ef..000000000
--- a/.prebuildrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "runtime": "napi",
- "include-regex": "(sharp-.+\\.node|libvips-.+\\.dll)",
- "prerelease": true,
- "strip": true
-}
diff --git a/biome.json b/biome.json
new file mode 100644
index 000000000..7946049c8
--- /dev/null
+++ b/biome.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "https://biomejs.dev/schemas/2.3.4/schema.json",
+ "vcs": {
+ "enabled": true,
+ "clientKind": "git",
+ "useIgnoreFile": true
+ },
+ "files": {
+ "ignoreUnknown": true
+ },
+ "linter": {
+ "enabled": true,
+ "rules": {
+ "recommended": true
+ }
+ },
+ "formatter": {
+ "enabled": false,
+ "useEditorconfig": true
+ },
+ "javascript": {
+ "formatter": {
+ "quoteStyle": "single"
+ }
+ }
+}
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index 87ffdab2b..2209c3381 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -1,6 +1,9 @@
// @ts-check
-import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
+import { defineConfig } from 'astro/config';
+import starlightAutoSidebar from 'starlight-auto-sidebar';
+
+import { version } from '../package.json';
export default defineConfig({
site: 'https://sharp.pixelplumbing.com',
@@ -68,12 +71,20 @@ export default defineConfig({
]
},
{ label: 'Performance', slug: 'performance' },
- { label: 'Changelog', slug: 'changelog' }
+ {
+ label: 'Changelog',
+ collapsed: true,
+ autogenerate: { directory: 'changelog' }
+ }
],
social: [
{ icon: 'openCollective', label: 'Open Collective', href: 'https://opencollective.com/libvips' },
{ icon: 'github', label: 'GitHub', href: 'https://github.com/lovell/sharp' }
- ]
+ ],
+ plugins: [starlightAutoSidebar()]
})
- ]
+ ],
+ redirects: {
+ '/changelog': `/changelog/v${version}`
+ }
});
diff --git a/docs/build.mjs b/docs/build.mjs
index de4d8b716..da43a5bf5 100644
--- a/docs/build.mjs
+++ b/docs/build.mjs
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
import fs from 'node:fs/promises';
import path from 'node:path';
diff --git a/docs/package.json b/docs/package.json
index cfb0f6520..7eaa41943 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -11,7 +11,8 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/starlight": "^0.34.3",
- "astro": "^5.7.13"
+ "@astrojs/starlight": "^0.36.2",
+ "astro": "^5.15.3",
+ "starlight-auto-sidebar": "^0.1.3"
}
}
diff --git a/docs/public/humans.txt b/docs/public/humans.txt
index 01af76f07..7119152ab 100644
--- a/docs/public/humans.txt
+++ b/docs/public/humans.txt
@@ -320,3 +320,9 @@ GitHub: https://github.com/qpincon
Name: Hans Chen
GitHub: https://github.com/hans00
+
+Name: Thibaut Patel
+GitHub: https://github.com/tpatel
+
+Name: Maël Nison
+GitHub: https://github.com/arcanis
diff --git a/docs/src/content.config.ts b/docs/src/content.config.ts
index d9ee8c9d1..06cf12929 100644
--- a/docs/src/content.config.ts
+++ b/docs/src/content.config.ts
@@ -1,7 +1,10 @@
import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';
+import { autoSidebarLoader } from 'starlight-auto-sidebar/loader'
+import { autoSidebarSchema } from 'starlight-auto-sidebar/schema'
export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
+ autoSidebar: defineCollection({ loader: autoSidebarLoader(), schema: autoSidebarSchema() })
};
diff --git a/docs/src/content/docs/api-channel.md b/docs/src/content/docs/api-channel.md
index 298083487..214e8611d 100644
--- a/docs/src/content/docs/api-channel.md
+++ b/docs/src/content/docs/api-channel.md
@@ -8,7 +8,7 @@ title: Channel manipulation
Remove alpha channels, if any. This is a no-op if the image does not have an alpha channel.
-See also [flatten](/api-operation#flatten).
+See also [flatten](/api-operation/#flatten).
**Example**
@@ -61,6 +61,8 @@ const rgba = await sharp(rgb)
Extract a single channel from a multi-channel image.
+The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
+
**Throws**:
diff --git a/docs/src/content/docs/api-colour.md b/docs/src/content/docs/api-colour.md
index b1085ed2b..6fb81debd 100644
--- a/docs/src/content/docs/api-colour.md
+++ b/docs/src/content/docs/api-colour.md
@@ -80,7 +80,7 @@ as defined by [toColourspace](#tocolourspace).
| Param | Type | Description |
| --- | --- | --- |
-| [colourspace] | string | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://github.com/libvips/libvips/blob/41cff4e9d0838498487a00623462204eb10ee5b8/libvips/iofuncs/enumtypes.c#L774) |
+| [colourspace] | string | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
**Example**
```js
@@ -123,7 +123,7 @@ By default output image will be web-friendly sRGB, with additional channels inte
| Param | Type | Description |
| --- | --- | --- |
-| [colourspace] | string | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/3c0bfdf74ce1dc37a6429bed47fa76f16e2cd70a/libvips/iofuncs/enumtypes.c#L777-L794) |
+| [colourspace] | string | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
**Example**
```js
diff --git a/docs/src/content/docs/api-composite.md b/docs/src/content/docs/api-composite.md
index ea185ba0c..d4f9b8550 100644
--- a/docs/src/content/docs/api-composite.md
+++ b/docs/src/content/docs/api-composite.md
@@ -21,7 +21,7 @@ The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`,
`hard-light`, `soft-light`, `difference`, `exclusion`.
More information about blend modes can be found at
-https://www.libvips.org/API/current/libvips-conversion.html#VipsBlendMode
+https://www.libvips.org/API/current/enum.BlendMode.html
and https://www.cairographics.org/operators/
@@ -64,8 +64,8 @@ and https://www.cairographics.org/operators/
| [images[].raw.height] | Number | | |
| [images[].raw.channels] | Number | | |
| [images[].animated] | boolean | false | Set to `true` to read all frames/pages of an animated image. |
-| [images[].failOn] | string | "'warning'" | @see [constructor parameters](/api-constructor#parameters) |
-| [images[].limitInputPixels] | number \| boolean | 268402689 | @see [constructor parameters](/api-constructor#parameters) |
+| [images[].failOn] | string | "'warning'" | @see [constructor parameters](/api-constructor/) |
+| [images[].limitInputPixels] | number \| boolean | 268402689 | @see [constructor parameters](/api-constructor/) |
**Example**
```js
diff --git a/docs/src/content/docs/api-constructor.md b/docs/src/content/docs/api-constructor.md
index 8010b58ba..3504239dc 100644
--- a/docs/src/content/docs/api-constructor.md
+++ b/docs/src/content/docs/api-constructor.md
@@ -44,24 +44,23 @@ where the overall height is the `pageHeight` multiplied by the number of `pages`
| [options.ignoreIcc] | number | false | should the embedded ICC profile, if any, be ignored. |
| [options.pages] | number | 1 | Number of pages to extract for multi-page input (GIF, WebP, TIFF), use -1 for all pages. |
| [options.page] | number | 0 | Page number to start extracting from for multi-page input (GIF, WebP, TIFF), zero based. |
-| [options.subifd] | number | -1 | subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image. |
-| [options.level] | number | 0 | level to extract from a multi-level input (OpenSlide), zero based. |
-| [options.pdfBackground] | string \| Object | | Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. |
| [options.animated] | boolean | false | Set to `true` to read all frames/pages of an animated image (GIF, WebP, TIFF), equivalent of setting `pages` to `-1`. |
| [options.raw] | Object | | describes raw pixel input image data. See `raw()` for pixel ordering. |
| [options.raw.width] | number | | integral number of pixels wide. |
| [options.raw.height] | number | | integral number of pixels high. |
| [options.raw.channels] | number | | integral number of channels, between 1 and 4. |
| [options.raw.premultiplied] | boolean | | specifies that the raw input has already been premultiplied, set to `true` to avoid sharp premultiplying the image. (optional, default `false`) |
+| [options.raw.pageHeight] | number | | The pixel height of each page/frame for animated images, must be an integral factor of `raw.height`. |
| [options.create] | Object | | describes a new image to be created. |
| [options.create.width] | number | | integral number of pixels wide. |
| [options.create.height] | number | | integral number of pixels high. |
| [options.create.channels] | number | | integral number of channels, either 3 (RGB) or 4 (RGBA). |
| [options.create.background] | string \| Object | | parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. |
+| [options.create.pageHeight] | number | | The pixel height of each page/frame for animated images, must be an integral factor of `create.height`. |
| [options.create.noise] | Object | | describes a noise to be created. |
| [options.create.noise.type] | string | | type of generated noise, currently only `gaussian` is supported. |
-| [options.create.noise.mean] | number | | mean of pixels in generated noise. |
-| [options.create.noise.sigma] | number | | standard deviation of pixels in generated noise. |
+| [options.create.noise.mean] | number | 128 | Mean value of pixels in the generated noise. |
+| [options.create.noise.sigma] | number | 30 | Standard deviation of pixel values in the generated noise. |
| [options.text] | Object | | describes a new text image to be created. |
| [options.text.text] | string | | text to render as a UTF-8 string. It can contain Pango markup, for example `LeMonde`. |
| [options.text.font] | string | | font name to render with. |
@@ -81,6 +80,17 @@ where the overall height is the `pageHeight` multiplied by the number of `pages`
| [options.join.background] | string \| Object | | parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. |
| [options.join.halign] | string | "'left'" | horizontal alignment style for images joined horizontally (`'left'`, `'centre'`, `'center'`, `'right'`). |
| [options.join.valign] | string | "'top'" | vertical alignment style for images joined vertically (`'top'`, `'centre'`, `'center'`, `'bottom'`). |
+| [options.tiff] | Object | | Describes TIFF specific options. |
+| [options.tiff.subifd] | number | -1 | Sub Image File Directory to extract for OME-TIFF, defaults to main image. |
+| [options.svg] | Object | | Describes SVG specific options. |
+| [options.svg.stylesheet] | string | | Custom CSS for SVG input, applied with a User Origin during the CSS cascade. |
+| [options.svg.highBitdepth] | boolean | false | Set to `true` to render SVG input at 32-bits per channel (128-bit) instead of 8-bits per channel (32-bit) RGBA. |
+| [options.pdf] | Object | | Describes PDF specific options. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. |
+| [options.pdf.background] | string \| Object | | Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. |
+| [options.openSlide] | Object | | Describes OpenSlide specific options. Requires the use of a globally-installed libvips compiled with support for OpenSlide. |
+| [options.openSlide.level] | number | 0 | Level to extract from a multi-level input, zero based. |
+| [options.jp2] | Object | | Describes JPEG 2000 specific options. Requires the use of a globally-installed libvips compiled with support for OpenJPEG. |
+| [options.jp2.oneshot] | boolean | false | Set to `true` to decode tiled JPEG 2000 images in a single operation, improving compatibility. |
**Example**
```js
diff --git a/docs/src/content/docs/api-input.md b/docs/src/content/docs/api-input.md
index 3e1f9a7da..8477f1ff5 100644
--- a/docs/src/content/docs/api-input.md
+++ b/docs/src/content/docs/api-input.md
@@ -13,17 +13,17 @@ It does not take into consideration any operations to be applied to the output i
such as resize or rotate.
Dimensions in the response will respect the `page` and `pages` properties of the
-[constructor parameters](/api-constructor#parameters).
+[constructor parameters](/api-constructor/).
A `Promise` is returned when `callback` is not provided.
-- `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
+- `format`: Name of decoder used to parse image e.g. `jpeg`, `png`, `webp`, `gif`, `svg`, `heif`, `tiff`
- `size`: Total size of image in bytes, for Stream and Buffer input only
- `width`: Number of pixels wide (EXIF orientation is not taken into consideration, see example below)
- `height`: Number of pixels high (EXIF orientation is not taken into consideration, see example below)
-- `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/VipsImage.html#VipsInterpretation)
+- `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
- `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
-- `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/VipsImage.html#VipsBandFormat)
+- `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/enum.BandFormat.html)
- `density`: Number of pixels per inch (DPI), if present
- `chromaSubsampling`: String containing JPEG chroma subsampling, `4:2:0` or `4:4:4` for RGB, `4:2:0:4` or `4:4:4:4` for CMYK
- `isProgressive`: Boolean indicating whether the image is interlaced using a progressive scan
@@ -46,6 +46,7 @@ A `Promise` is returned when `callback` is not provided.
- `icc`: Buffer containing raw [ICC](https://www.npmjs.com/package/icc) profile data, if present
- `iptc`: Buffer containing raw IPTC data, if present
- `xmp`: Buffer containing raw XMP data, if present
+- `xmpAsString`: String containing XMP data, if valid UTF-8.
- `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
- `formatMagick`: String containing format for images loaded via *magick
- `comments`: Array of keyword/text pairs representing PNG text blocks, if present.
diff --git a/docs/src/content/docs/api-operation.md b/docs/src/content/docs/api-operation.md
index dea7c79e3..abcb41fc1 100644
--- a/docs/src/content/docs/api-operation.md
+++ b/docs/src/content/docs/api-operation.md
@@ -179,7 +179,7 @@ When used without parameters, performs a fast, mild sharpen of the output image.
When a `sigma` is provided, performs a slower, more accurate sharpen of the L channel in the LAB colour space.
Fine-grained control over the level of sharpening in "flat" (m1) and "jagged" (m2) areas is available.
-See [libvips sharpen](https://www.libvips.org/API/current/libvips-convolution.html#vips-sharpen) operation.
+See [libvips sharpen](https://www.libvips.org/API/current/method.Image.sharpen.html) operation.
**Throws**:
diff --git a/docs/src/content/docs/api-output.md b/docs/src/content/docs/api-output.md
index 9cca1d554..5acd2fadb 100644
--- a/docs/src/content/docs/api-output.md
+++ b/docs/src/content/docs/api-output.md
@@ -201,7 +201,7 @@ const dataWithMergedExif = await sharp(inputWithExif)
Keep ICC profile from the input image in the output image.
-Where necessary, will attempt to convert the output colour space to match the profile.
+When input and output colour spaces differ, use with [toColourspace](/api-colour/#tocolourspace) and optionally [pipelineColourspace](/api-colour/#pipelinecolourspace).
**Since**: 0.33.0
@@ -211,6 +211,14 @@ const outputWithIccProfile = await sharp(inputWithIccProfile)
.keepIccProfile()
.toBuffer();
```
+**Example**
+```js
+const cmykOutputWithIccProfile = await sharp(cmykInputWithIccProfile)
+ .pipelineColourspace('cmyk')
+ .toColourspace('cmyk')
+ .keepIccProfile()
+ .toBuffer();
+```
## withIccProfile
@@ -242,6 +250,57 @@ const outputWithP3 = await sharp(input)
```
+## keepXmp
+> keepXmp() ⇒ Sharp
+
+Keep XMP metadata from the input image in the output image.
+
+
+**Since**: 0.34.3
+**Example**
+```js
+const outputWithXmp = await sharp(inputWithXmp)
+ .keepXmp()
+ .toBuffer();
+```
+
+
+## withXmp
+> withXmp(xmp) ⇒ Sharp
+
+Set XMP metadata in the output image.
+
+Supported by PNG, JPEG, WebP, and TIFF output.
+
+
+**Throws**:
+
+- Error Invalid parameters
+
+**Since**: 0.34.3
+
+| Param | Type | Description |
+| --- | --- | --- |
+| xmp | string | String containing XMP metadata to be embedded in the output image. |
+
+**Example**
+```js
+const xmpString = `
+
+
+
+
+ John Doe
+
+
+ `;
+
+const data = await sharp(input)
+ .withXmp(xmpString)
+ .toBuffer();
+```
+
+
## keepMetadata
> keepMetadata() ⇒ Sharp
@@ -379,7 +438,7 @@ Indexed PNG input at 1, 2 or 4 bits per pixel is converted to 8 bits per pixel.
Set `palette` to `true` for slower, indexed PNG output.
For 16 bits per pixel output, convert to `rgb16` via
-[toColourspace](/api-colour#tocolourspace).
+[toColourspace](/api-colour/#tocolourspace).
**Throws**:
@@ -496,6 +555,7 @@ The palette of the input image will be re-used if possible.
| [options.dither] | number | 1.0 | level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most) |
| [options.interFrameMaxError] | number | 0 | maximum inter-frame error for transparency, between 0 (lossless) and 32 |
| [options.interPaletteMaxError] | number | 3 | maximum inter-palette error for palette reuse, between 0 and 256 |
+| [options.keepDuplicateFrames] | boolean | false | keep duplicate frames in the output instead of combining them |
| [options.loop] | number | 0 | number of animation iterations, use 0 for infinite animation |
| [options.delay] | number \| Array.<number> | | delay(s) between animation frames (in milliseconds) |
| [options.force] | boolean | true | force GIF output, otherwise attempt to use input format |
@@ -537,7 +597,7 @@ Use these JP2 options for output image.
Requires libvips compiled with support for OpenJPEG.
The prebuilt binaries do not include this - see
-[installing a custom libvips](https://sharp.pixelplumbing.com/install#custom-libvips).
+[installing a custom libvips](/install#custom-libvips).
**Throws**:
@@ -594,6 +654,7 @@ instead of providing `xres` and `yres` in pixels/mm.
| [options.quality] | number | 80 | quality, integer 1-100 |
| [options.force] | boolean | true | force TIFF output, otherwise attempt to use input format |
| [options.compression] | string | "'jpeg'" | compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k |
+| [options.bigtiff] | boolean | false | use BigTIFF variant (has no effect when compression is none) |
| [options.predictor] | string | "'horizontal'" | compression predictor options: none, horizontal, float |
| [options.pyramid] | boolean | false | write an image pyramid |
| [options.tile] | boolean | false | write a tiled tiff |
@@ -701,7 +762,7 @@ This feature is experimental, please do not use in production systems.
Requires libvips compiled with support for libjxl.
The prebuilt binaries do not include this - see
-[installing a custom libvips](https://sharp.pixelplumbing.com/install#custom-libvips).
+[installing a custom libvips](/install/#custom-libvips).
**Throws**:
diff --git a/docs/src/content/docs/api-resize.md b/docs/src/content/docs/api-resize.md
index da7ac53bf..6452c3455 100644
--- a/docs/src/content/docs/api-resize.md
+++ b/docs/src/content/docs/api-resize.md
@@ -38,6 +38,8 @@ Possible downsizing kernels are:
- `mitchell`: Use a [Mitchell-Netravali spline](https://www.cs.utexas.edu/~fussell/courses/cs384g-fall2013/lectures/mitchell/Mitchell.pdf).
- `lanczos2`: Use a [Lanczos kernel](https://en.wikipedia.org/wiki/Lanczos_resampling#Lanczos_kernel) with `a=2`.
- `lanczos3`: Use a Lanczos kernel with `a=3` (the default).
+- `mks2013`: Use a [Magic Kernel Sharp](https://johncostella.com/magic/mks.pdf) 2013 kernel, as adopted by Facebook.
+- `mks2021`: Use a Magic Kernel Sharp 2021 kernel, with more accurate (reduced) sharpening than the 2013 version.
When upsampling, these kernels map to `nearest`, `linear` and `cubic` interpolators.
Downsampling kernels without a matching upsampling interpolator map to `cubic`.
diff --git a/docs/src/content/docs/api-utility.md b/docs/src/content/docs/api-utility.md
index 8a7ef2483..73190fd01 100644
--- a/docs/src/content/docs/api-utility.md
+++ b/docs/src/content/docs/api-utility.md
@@ -113,15 +113,9 @@ Some image format libraries spawn additional threads,
e.g. libaom manages its own 4 threads when encoding AVIF images,
and these are independent of the value set here.
-The maximum number of images that sharp can process in parallel
-is controlled by libuv's `UV_THREADPOOL_SIZE` environment variable,
-which defaults to 4.
-
-https://nodejs.org/api/cli.html#uv_threadpool_sizesize
-
-For example, by default, a machine with 8 CPU cores will process
-4 images in parallel and use up to 8 threads per image,
-so there will be up to 32 concurrent threads.
+:::note
+Further [control over performance](/performance/) is available.
+:::
**Returns**: number - concurrency
diff --git a/docs/src/content/docs/changelog.md b/docs/src/content/docs/changelog.md
deleted file mode 100644
index b9cbc7b6e..000000000
--- a/docs/src/content/docs/changelog.md
+++ /dev/null
@@ -1,2147 +0,0 @@
----
-title: Changelog
----
-
-## v0.34 - *hat*
-
-Requires libvips v8.16.1
-
-### v0.34.2 - 20th May 2025
-
-* Ensure animated GIF to WebP conversion retains loop (regression in 0.34.0).
- [#3394](https://github.com/lovell/sharp/issues/3394)
-
-* Ensure `pdfBackground` constructor property is used.
- [#4207](https://github.com/lovell/sharp/pull/4207)
- [#4398](https://github.com/lovell/sharp/issues/4398)
-
-* Add experimental support for prebuilt Windows ARM64 binaries.
- [#4375](https://github.com/lovell/sharp/pull/4375)
- [@hans00](https://github.com/hans00)
-
-* Ensure resizing with a `fit` of `contain` supports multiple alpha channels.
- [#4382](https://github.com/lovell/sharp/issues/4382)
-
-* TypeScript: Ensure `metadata` response more closely matches reality.
- [#4383](https://github.com/lovell/sharp/issues/4383)
-
-* TypeScript: Ensure `smartDeblock` property is included in WebP definition.
- [#4387](https://github.com/lovell/sharp/pull/4387)
- [@Stephen-X](https://github.com/Stephen-X)
-
-* Ensure support for wide-character filenames on Windows (regression in 0.34.0).
- [#4391](https://github.com/lovell/sharp/issues/4391)
-
-### v0.34.1 - 7th April 2025
-
-* TypeScript: Ensure new `autoOrient` property is optional.
- [#4362](https://github.com/lovell/sharp/pull/4362)
- [@styfle](https://github.com/styfle)
-
-### v0.34.0 - 4th April 2025
-
-* Breaking: Support array of input images to be joined or animated.
- [#1580](https://github.com/lovell/sharp/issues/1580)
-
-* Breaking: Ensure `removeAlpha` removes all alpha channels.
- [#2266](https://github.com/lovell/sharp/issues/2266)
-
-* Breaking: Non-animated GIF output defaults to no-loop instead of loop-forever.
- [#3394](https://github.com/lovell/sharp/issues/3394)
-
-* Breaking: Support `info.size` on wide-character systems via upgrade to C++17.
- [#3943](https://github.com/lovell/sharp/issues/3943)
-
-* Breaking: Ensure `background` metadata can be parsed by `color` package.
- [#4090](https://github.com/lovell/sharp/issues/4090)
-
-* Add `isPalette` and `bitsPerSample` to metadata, deprecate `paletteBitDepth`.
-
-* Expose WebP `smartDeblock` output option.
-
-* Prevent use of linux-x64 binaries with v1 microarchitecture.
-
-* Add `autoOrient` operation and constructor option.
- [#4151](https://github.com/lovell/sharp/pull/4151)
- [@happycollision](https://github.com/happycollision)
-
-* TypeScript: Ensure channel counts use the correct range.
- [#4197](https://github.com/lovell/sharp/pull/4197)
- [@DavidVaness](https://github.com/DavidVaness)
-
-* Improve support for ppc64le architecture.
- [#4203](https://github.com/lovell/sharp/pull/4203)
- [@sumitd2](https://github.com/sumitd2)
-
-* Add `pdfBackground` constructor property.
- [#4207](https://github.com/lovell/sharp/pull/4207)
- [@calebmer](https://github.com/calebmer)
-
-* Expose erode and dilate operations.
- [#4243](https://github.com/lovell/sharp/pull/4243)
- [@qpincon](https://github.com/qpincon)
-
-* Add support for RGBE images. Requires libvips compiled with radiance support.
- [#4316](https://github.com/lovell/sharp/pull/4316)
- [@florentzabera](https://github.com/florentzabera)
-
-* Allow wide-gamut HEIF output at higher bitdepths.
- [#4344](https://github.com/lovell/sharp/issues/4344)
-
-## v0.33 - *gauge*
-
-Requires libvips v8.15.3
-
-### v0.33.5 - 16th August 2024
-
-* Upgrade to libvips v8.15.3 for upstream bug fixes.
-
-* Add `pageHeight` and `pages` to response of multi-page output.
- [#3411](https://github.com/lovell/sharp/issues/3411)
-
-* Ensure option to force use of a globally-installed libvips works correctly.
- [#4111](https://github.com/lovell/sharp/pull/4111)
- [@project0](https://github.com/project0)
-
-* Minimise use of `engines` property to improve yarn v1 support.
- [#4130](https://github.com/lovell/sharp/issues/4130)
-
-* Ensure `sharp.format.heif` includes only AVIF when using prebuilt binaries.
- [#4132](https://github.com/lovell/sharp/issues/4132)
-
-* Add support to recomb operation for 4x4 matrices.
- [#4147](https://github.com/lovell/sharp/pull/4147)
- [@ton11797](https://github.com/ton11797)
-
-* Expose PNG text chunks as `comments` metadata.
- [#4157](https://github.com/lovell/sharp/pull/4157)
- [@nkeynes](https://github.com/nkeynes)
-
-* Expose optional `precision` and `minAmplitude` parameters of `blur` operation.
- [#4168](https://github.com/lovell/sharp/pull/4168)
- [#4172](https://github.com/lovell/sharp/pull/4172)
- [@marcosc90](https://github.com/marcosc90)
-
-* Ensure `keepIccProfile` avoids colour transformation where possible.
- [#4186](https://github.com/lovell/sharp/issues/4186)
-
-* TypeScript: `chromaSubsampling` metadata is optional.
- [#4191](https://github.com/lovell/sharp/pull/4191)
- [@DavidVaness](https://github.com/DavidVaness)
-
-### v0.33.4 - 16th May 2024
-
-* Remove experimental status from `pipelineColourspace`.
-
-* Reduce default concurrency when musl thread over-subscription detected.
-
-* TypeScript: add missing definitions for `OverlayOptions`.
- [#4048](https://github.com/lovell/sharp/pull/4048)
- [@ike-gg](https://github.com/ike-gg)
-
-* Install: add advanced option to force use of a globally-installed libvips.
- [#4060](https://github.com/lovell/sharp/issues/4060)
-
-* Expose `bilinear` resizing kernel (and interpolator).
- [#4061](https://github.com/lovell/sharp/issues/4061)
-
-* Ensure `extend` operation stays sequential for multi-page TIFF (regression in 0.32.0).
- [#4069](https://github.com/lovell/sharp/issues/4069)
-
-* Tighten validation of constructor `text` integer properties.
- [#4071](https://github.com/lovell/sharp/issues/4071)
-
-* Simplify internal StaySequential logic.
- [#4074](https://github.com/lovell/sharp/pull/4074)
- [@kleisauke](https://github.com/kleisauke)
-
-* Ensure negate operation occurs after profile conversion.
- [#4096](https://github.com/lovell/sharp/pull/4096)
- [@adriaanmeuris](https://github.com/adriaanmeuris)
-
-### v0.33.3 - 23rd March 2024
-
-* Upgrade to libvips v8.15.2 for upstream bug fixes.
-
-* Ensure `keepIccProfile` retains P3 and CMYK input profiles.
- [#3906](https://github.com/lovell/sharp/issues/3906)
- [#4008](https://github.com/lovell/sharp/issues/4008)
-
-* Ensure `text.wrap` property can accept `word-char` as value.
- [#4028](https://github.com/lovell/sharp/pull/4028)
- [@yolopunk](https://github.com/yolopunk)
-
-* Ensure `clone` takes a deep copy of existing options.
- [#4029](https://github.com/lovell/sharp/issues/4029)
-
-* Add `bitdepth` option to `heif` output (prebuilt binaries support 8-bit only).
- [#4036](https://github.com/lovell/sharp/pull/4036)
- [@mertalev](https://github.com/mertalev)
-
-### v0.33.2 - 12th January 2024
-
-* Upgrade to libvips v8.15.1 for upstream bug fixes.
-
-* TypeScript: add definition for `keepMetadata`.
- [#3914](https://github.com/lovell/sharp/pull/3914)
- [@abhi0498](https://github.com/abhi0498)
-
-* Ensure `extend` operation stays sequential when copying (regression in 0.32.0).
- [#3928](https://github.com/lovell/sharp/issues/3928)
-
-* Improve error handling for unsupported multi-page rotation.
- [#3940](https://github.com/lovell/sharp/issues/3940)
-
-### v0.33.1 - 17th December 2023
-
-* Add support for Yarn Plug'n'Play filesystem layout.
- [#3888](https://github.com/lovell/sharp/issues/3888)
-
-* Emit warning when attempting to use invalid ICC profiles.
- [#3895](https://github.com/lovell/sharp/issues/3895)
-
-* Ensure `VIPS_NOVECTOR` environment variable is respected.
- [#3897](https://github.com/lovell/sharp/pull/3897)
- [@icetee](https://github.com/icetee)
-
-### v0.33.0 - 29th November 2023
-
-* Drop support for Node.js 14 and 16, now requires Node.js ^18.17.0 or >= 20.3.0
-
-* Prebuilt binaries distributed via npm registry and installed via package manager.
-
-* Building from source requires dependency on `node-addon-api`.
-
-* Remove `sharp.vendor`.
-
-* Partially deprecate `withMetadata()`, use `withExif()` and `withIccProfile()`.
-
-* Add experimental support for WebAssembly-based runtimes.
- [@RReverser](https://github.com/RReverser)
-
-* Options for `trim` operation must be an Object, add new `lineArt` option.
- [#2363](https://github.com/lovell/sharp/issues/2363)
-
-* Improve luminance of `tint` operation with weighting function.
- [#3338](https://github.com/lovell/sharp/issues/3338)
- [@jcupitt](https://github.com/jcupitt)
-
-* Ensure all `Error` objects contain a `stack` property.
- [#3653](https://github.com/lovell/sharp/issues/3653)
-
-* Make `compression` option of `heif` mandatory to help reduce HEIF vs HEIC confusion.
- [#3740](https://github.com/lovell/sharp/issues/3740)
-
-* Ensure correct interpretation of 16-bit raw input.
- [#3808](https://github.com/lovell/sharp/issues/3808)
-
-* Add support for `miniswhite` when using TIFF output.
- [#3812](https://github.com/lovell/sharp/pull/3812)
- [@dnsbty](https://github.com/dnsbty)
-
-* TypeScript: add missing definition for `withMetadata` boolean.
- [#3823](https://github.com/lovell/sharp/pull/3823)
- [@uhthomas](https://github.com/uhthomas)
-
-* Add more fine-grained control over output metadata.
- [#3824](https://github.com/lovell/sharp/issues/3824)
-
-* Ensure multi-page extract remains sequential.
- [#3837](https://github.com/lovell/sharp/issues/3837)
-
-## v0.32 - *flow*
-
-Requires libvips v8.14.5
-
-### v0.32.6 - 18th September 2023
-
-* Upgrade to libvips v8.14.5 for upstream bug fixes.
-
-* Ensure composite tile images are fully decoded (regression in 0.32.0).
- [#3767](https://github.com/lovell/sharp/issues/3767)
-
-* Ensure `withMetadata` can add ICC profiles to RGB16 output.
- [#3773](https://github.com/lovell/sharp/issues/3773)
-
-* Ensure `withMetadata` does not reduce 16-bit images to 8-bit (regression in 0.32.5).
- [#3773](https://github.com/lovell/sharp/issues/3773)
-
-* TypeScript: Add definitions for block and unblock.
- [#3799](https://github.com/lovell/sharp/pull/3799)
- [@ldrick](https://github.com/ldrick)
-
-### v0.32.5 - 15th August 2023
-
-* Upgrade to libvips v8.14.4 for upstream bug fixes.
-
-* TypeScript: Add missing `WebpPresetEnum` to definitions.
- [#3748](https://github.com/lovell/sharp/pull/3748)
- [@pilotso11](https://github.com/pilotso11)
-
-* Ensure compilation using musl v1.2.4.
- [#3755](https://github.com/lovell/sharp/pull/3755)
- [@kleisauke](https://github.com/kleisauke)
-
-* Ensure resize with a `fit` of `inside` respects 90/270 degree rotation.
- [#3756](https://github.com/lovell/sharp/issues/3756)
-
-* TypeScript: Ensure `minSize` property of `WebpOptions` is boolean.
- [#3758](https://github.com/lovell/sharp/pull/3758)
- [@sho-xizz](https://github.com/sho-xizz)
-
-* Ensure `withMetadata` adds default sRGB profile.
- [#3761](https://github.com/lovell/sharp/issues/3761)
-
-### v0.32.4 - 21st July 2023
-
-* Upgrade to libvips v8.14.3 for upstream bug fixes.
-
-* Expose ability to (un)block low-level libvips operations by name.
-
-* Prebuilt binaries: restore support for tile-based output.
- [#3581](https://github.com/lovell/sharp/issues/3581)
-
-### v0.32.3 - 14th July 2023
-
-* Expose `preset` option for WebP output.
- [#3639](https://github.com/lovell/sharp/issues/3639)
-
-* Ensure decoding remains sequential for all operations (regression in 0.32.2).
- [#3725](https://github.com/lovell/sharp/issues/3725)
-
-### v0.32.2 - 11th July 2023
-
-* Limit HEIF output dimensions to 16384x16384, matches libvips.
-
-* Ensure exceptions are not thrown when terminating.
- [#3569](https://github.com/lovell/sharp/issues/3569)
-
-* Ensure the same access method is used for all inputs (regression in 0.32.0).
- [#3669](https://github.com/lovell/sharp/issues/3669)
-
-* Improve detection of jp2 filename extensions.
- [#3674](https://github.com/lovell/sharp/pull/3674)
- [@bianjunjie1981](https://github.com/bianjunjie1981)
-
-* Guard use of smartcrop premultiplied option to prevent warning (regression in 0.32.1).
- [#3710](https://github.com/lovell/sharp/issues/3710)
-
-* Prevent over-compute in affine-based rotate before resize.
- [#3722](https://github.com/lovell/sharp/issues/3722)
-
-* Allow sequential read for EXIF-based auto-orientation.
- [#3725](https://github.com/lovell/sharp/issues/3725)
-
-### v0.32.1 - 27th April 2023
-
-* Add experimental `unflatten` operation.
- [#3461](https://github.com/lovell/sharp/pull/3461)
- [@antonmarsden](https://github.com/antonmarsden)
-
-* Ensure use of `flip` operation forces random access read (regression in 0.32.0).
- [#3600](https://github.com/lovell/sharp/issues/3600)
-
-* Ensure `linear` operation works with 16-bit input (regression in 0.31.3).
- [#3605](https://github.com/lovell/sharp/issues/3605)
-
-* Install: ensure proxy URLs are logged correctly.
- [#3615](https://github.com/lovell/sharp/pull/3615)
- [@TomWis97](https://github.com/TomWis97)
-
-* Ensure profile-less CMYK to CMYK roundtrip skips colourspace conversion.
- [#3620](https://github.com/lovell/sharp/issues/3620)
-
-* Add support for `modulate` operation when using non-sRGB pipeline colourspace.
- [#3620](https://github.com/lovell/sharp/issues/3620)
-
-* Ensure `trim` operation works with CMYK images (regression in 0.31.0).
- [#3636](https://github.com/lovell/sharp/issues/3636)
-
-* Install: coerce libc version to semver.
- [#3641](https://github.com/lovell/sharp/issues/3641)
-
-### v0.32.0 - 24th March 2023
-
-* Default to using sequential rather than random access read where possible.
-
-* Replace GIF output `optimise` / `optimize` option with `reuse`.
-
-* Add `progressive` option to GIF output for interlacing.
-
-* Add `wrap` option to text image creation.
-
-* Add `formatMagick` property to metadata of images loaded via *magick.
-
-* Prefer integer (un)premultiply for faster resizing of RGBA images.
-
-* Add `ignoreIcc` input option to ignore embedded ICC profile.
-
-* Allow use of GPS (IFD3) EXIF metadata.
- [#2767](https://github.com/lovell/sharp/issues/2767)
-
-* TypeScript definitions are now maintained and published directly, deprecating the `@types/sharp` package.
- [#3369](https://github.com/lovell/sharp/issues/3369)
-
-* Prebuilt binaries: ensure macOS 10.13+ support, as documented.
- [#3438](https://github.com/lovell/sharp/issues/3438)
-
-* Prebuilt binaries: prevent use of glib slice allocator, improves QEMU support.
- [#3448](https://github.com/lovell/sharp/issues/3448)
-
-* Add focus point coordinates to output when using attention based crop.
- [#3470](https://github.com/lovell/sharp/pull/3470)
- [@ejoebstl](https://github.com/ejoebstl)
-
-* Expose sharp version as `sharp.versions.sharp`.
- [#3471](https://github.com/lovell/sharp/issues/3471)
-
-* Respect `fastShrinkOnLoad` resize option for WebP input.
- [#3516](https://github.com/lovell/sharp/issues/3516)
-
-* Reduce sharpen `sigma` maximum from 10000 to 10.
- [#3521](https://github.com/lovell/sharp/issues/3521)
-
-* Add support for `ArrayBuffer` input.
- [#3548](https://github.com/lovell/sharp/pull/3548)
- [@kapouer](https://github.com/kapouer)
-
-* Add support to `extend` operation for `extendWith` to allow copy/mirror/repeat.
- [#3556](https://github.com/lovell/sharp/pull/3556)
- [@janaz](https://github.com/janaz)
-
-* Ensure all async JS callbacks are wrapped to help avoid possible race condition.
- [#3569](https://github.com/lovell/sharp/issues/3569)
-
-* Prebuilt binaries: support for tile-based output temporarily removed due to licensing issue.
- [#3581](https://github.com/lovell/sharp/issues/3581)
-
-* Add support to `normalise` for `lower` and `upper` percentiles.
- [#3583](https://github.com/lovell/sharp/pull/3583)
- [@LachlanNewman](https://github.com/LachlanNewman)
-
-## v0.31 - *eagle*
-
-Requires libvips v8.13.3
-
-### v0.31.3 - 21st December 2022
-
-* Add experimental support for JPEG-XL images. Requires libvips compiled with libjxl.
- [#2731](https://github.com/lovell/sharp/issues/2731)
-
-* Add runtime detection of V8 memory cage, ensures compatibility with Electron 21 onwards.
- [#3384](https://github.com/lovell/sharp/issues/3384)
-
-* Expose `interFrameMaxError` and `interPaletteMaxError` GIF optimisation properties.
- [#3401](https://github.com/lovell/sharp/issues/3401)
-
-* Allow installation on Linux with glibc patch versions e.g. Fedora 38.
- [#3423](https://github.com/lovell/sharp/issues/3423)
-
-* Expand range of existing `sharpen` parameters to match libvips.
- [#3427](https://github.com/lovell/sharp/issues/3427)
-
-* Prevent possible race condition awaiting metadata of Stream-based input.
- [#3451](https://github.com/lovell/sharp/issues/3451)
-
-* Improve `extractChannel` support for 16-bit output colourspaces.
- [#3453](https://github.com/lovell/sharp/issues/3453)
-
-* Ignore `sequentialRead` option when calculating image statistics.
- [#3462](https://github.com/lovell/sharp/issues/3462)
-
-* Small performance improvement for operations that introduce a non-opaque background.
- [#3465](https://github.com/lovell/sharp/issues/3465)
-
-* Ensure integral output of `linear` operation.
- [#3468](https://github.com/lovell/sharp/issues/3468)
-
-### v0.31.2 - 4th November 2022
-
-* Upgrade to libvips v8.13.3 for upstream bug fixes.
-
-* Ensure manual flip, rotate, resize operation ordering (regression in 0.31.1)
- [#3391](https://github.com/lovell/sharp/issues/3391)
-
-* Ensure auto-rotation works without resize (regression in 0.31.1)
- [#3422](https://github.com/lovell/sharp/issues/3422)
-
-### v0.31.1 - 29th September 2022
-
-* Upgrade to libvips v8.13.2 for upstream bug fixes.
-
-* Ensure `close` event occurs after `end` event for Stream-based output.
- [#3313](https://github.com/lovell/sharp/issues/3313)
-
-* Ensure `limitInputPixels` constructor option uses uint64.
- [#3349](https://github.com/lovell/sharp/pull/3349)
- [@marcosc90](https://github.com/marcosc90)
-
-* Ensure auto-rotation works with shrink-on-load and extract (regression in 0.31.0).
- [#3352](https://github.com/lovell/sharp/issues/3352)
-
-* Ensure AVIF output is always 8-bit.
- [#3358](https://github.com/lovell/sharp/issues/3358)
-
-* Ensure greyscale images can be trimmed (regression in 0.31.0).
- [#3386](https://github.com/lovell/sharp/issues/3386)
-
-### v0.31.0 - 5th September 2022
-
-* Drop support for Node.js 12, now requires Node.js >= 14.15.0.
-
-* GIF output now re-uses input palette if possible. Use `reoptimise` option to generate a new palette.
-
-* Add WebP `minSize` and `mixed` options for greater control over animation frames.
-
-* Remove previously-deprecated WebP `reductionEffort` and HEIF `speed` options. Use `effort` to control these.
-
-* The `flip` and `flop` operations will now occur before the `rotate` operation.
-
-* Improve `normalise` operation with use of histogram.
- [#200](https://github.com/lovell/sharp/issues/200)
-
-* Use combined bounding box of alpha and non-alpha channels for `trim` operation.
- [#2166](https://github.com/lovell/sharp/issues/2166)
-
-* Add Buffer and Stream support to tile-based output.
- [#2238](https://github.com/lovell/sharp/issues/2238)
-
-* Add input `fileSuffix` and output `alias` to `format` information.
- [#2642](https://github.com/lovell/sharp/issues/2642)
-
-* Re-introduce support for greyscale ICC profiles (temporarily removed in 0.30.2).
- [#3114](https://github.com/lovell/sharp/issues/3114)
-
-* Add support for WebP and PackBits `compression` options with TIFF output.
- [#3198](https://github.com/lovell/sharp/issues/3198)
-
-* Ensure OpenSlide and FITS input works with custom libvips.
- [#3226](https://github.com/lovell/sharp/issues/3226)
-
-* Ensure `trim` operation is a no-op when it would reduce an image to nothing.
- [#3223](https://github.com/lovell/sharp/issues/3223)
-
-* Expose `vips_text` to create an image containing rendered text.
- [#3252](https://github.com/lovell/sharp/pull/3252)
- [@brahima](https://github.com/brahima)
-
-* Ensure only properties owned by the `withMetadata` EXIF Object are parsed.
- [#3292](https://github.com/lovell/sharp/issues/3292)
-
-* Expand `linear` operation to allow use of per-channel arrays.
- [#3303](https://github.com/lovell/sharp/pull/3303)
- [@antonmarsden](https://github.com/antonmarsden)
-
-* Ensure the order of `rotate`, `resize` and `extend` operations is respected where possible.
- Emit warnings when previous calls in the same pipeline will be ignored.
- [#3319](https://github.com/lovell/sharp/issues/3319)
-
-* Ensure PNG bitdepth can be set for non-palette output.
- [#3322](https://github.com/lovell/sharp/issues/3322)
-
-* Add trim option to provide a specific background colour.
- [#3332](https://github.com/lovell/sharp/pull/3332)
- [@mart-jansink](https://github.com/mart-jansink)
-
-* Ensure resized image is unpremultiplied before composite.
- [#3334](https://github.com/lovell/sharp/issues/3334)
-
-## v0.30 - *dresser*
-
-Requires libvips v8.12.2
-
-### v0.30.7 - 22nd June 2022
-
-* Ensure tiled composition always works with outside resizing.
- [#3227](https://github.com/lovell/sharp/issues/3227)
-
-* Allow WebP encoding effort of 0.
- [#3261](https://github.com/lovell/sharp/pull/3261)
- [@AlexanderTheGrey](https://github.com/AlexanderTheGrey)
-
-* Prevent upsampling via libwebp.
- [#3267](https://github.com/lovell/sharp/pull/3267)
- [@blacha](https://github.com/blacha)
-
-### v0.30.6 - 30th May 2022
-
-* Allow values for `limitInputPixels` larger than 32-bit.
- [#3238](https://github.com/lovell/sharp/issues/3238)
-
-* Ensure brew-installed `vips` can be detected (regression in 0.30.5).
- [#3239](https://github.com/lovell/sharp/issues/3239)
-
-### v0.30.5 - 23rd May 2022
-
-* Install: pass `PKG_CONFIG_PATH` via env rather than substitution.
- [@dwisiswant0](https://github.com/dwisiswant0)
-
-* Add support for `--libc` flag to improve cross-platform installation.
- [#3160](https://github.com/lovell/sharp/pull/3160)
- [@joonamo](https://github.com/joonamo)
-
-* Allow installation of prebuilt libvips binaries from filesystem.
- [#3196](https://github.com/lovell/sharp/pull/3196)
- [@ankurparihar](https://github.com/ankurparihar)
-
-* Fix rotate-then-extract for EXIF orientation 2.
- [#3218](https://github.com/lovell/sharp/pull/3218)
- [@jakob0fischl](https://github.com/jakob0fischl)
-
-### v0.30.4 - 18th April 2022
-
-* Increase control over sensitivity to invalid images via `failOn`, deprecate `failOnError` (equivalent to `failOn: 'warning'`).
-
-* Ensure `create` input image has correct bit depth and colour space.
- [#3139](https://github.com/lovell/sharp/issues/3139)
-
-* Add support for `TypedArray` input with `byteOffset` and `length`.
- [#3146](https://github.com/lovell/sharp/pull/3146)
- [@codepage949](https://github.com/codepage949)
-
-* Improve error message when attempting to render SVG input greater than 32767x32767.
- [#3167](https://github.com/lovell/sharp/issues/3167)
-
-* Add missing file name to 'Input file is missing' error message.
- [#3178](https://github.com/lovell/sharp/pull/3178)
- [@Brodan](https://github.com/Brodan)
-
-### v0.30.3 - 14th March 2022
-
-* Allow `sharpen` options to be provided more consistently as an Object.
- [#2561](https://github.com/lovell/sharp/issues/2561)
-
-* Expose `x1`, `y2` and `y3` parameters of `sharpen` operation.
- [#2935](https://github.com/lovell/sharp/issues/2935)
-
-* Prevent double unpremultiply with some composite blend modes (regression in 0.30.2).
- [#3118](https://github.com/lovell/sharp/issues/3118)
-
-### v0.30.2 - 2nd March 2022
-
-* Improve performance and accuracy when compositing multiple images.
- [#2286](https://github.com/lovell/sharp/issues/2286)
-
-* Expand pkgconfig search path for wider BSD support.
- [#3106](https://github.com/lovell/sharp/issues/3106)
-
-* Ensure Windows C++ runtime is linked statically (regression in 0.30.0).
- [#3110](https://github.com/lovell/sharp/pull/3110)
- [@kleisauke](https://github.com/kleisauke)
-
-* Temporarily ignore greyscale ICC profiles to workaround lcms bug.
- [#3112](https://github.com/lovell/sharp/issues/3112)
-
-### v0.30.1 - 9th February 2022
-
-* Allow use of `toBuffer` and `toFile` on the same instance.
- [#3044](https://github.com/lovell/sharp/issues/3044)
-
-* Skip shrink-on-load for known libjpeg rounding errors.
- [#3066](https://github.com/lovell/sharp/issues/3066)
- [@kleisauke](https://github.com/kleisauke)
-
-* Ensure withoutReduction does not interfere with contain/crop/embed.
- [#3081](https://github.com/lovell/sharp/pull/3081)
- [@kleisauke](https://github.com/kleisauke)
-
-* Ensure affine interpolator is correctly finalised.
- [#3083](https://github.com/lovell/sharp/pull/3083)
- [@kleisauke](https://github.com/kleisauke)
-
-### v0.30.0 - 1st February 2022
-
-* Add support for GIF output to prebuilt binaries.
-
-* Reduce minimum Linux ARM64v8 glibc requirement to 2.17.
-
-* Verify prebuilt binaries with a Subresource Integrity check.
-
-* Standardise WebP `effort` option name, deprecate `reductionEffort`.
-
-* Standardise HEIF `effort` option name, deprecate `speed`.
-
-* Add support for IIIF v3 tile-based output.
-
-* Expose control over CPU effort for palette-based PNG output.
- [#2541](https://github.com/lovell/sharp/issues/2541)
-
-* Improve animated (multi-page) image resize and extract.
- [#2789](https://github.com/lovell/sharp/pull/2789)
- [@kleisauke](https://github.com/kleisauke)
-
-* Expose platform and architecture of vendored binaries as `sharp.vendor`.
- [#2928](https://github.com/lovell/sharp/issues/2928)
-
-* Ensure 16-bit PNG output uses correct bitdepth.
- [#2958](https://github.com/lovell/sharp/pull/2958)
- [@gforge](https://github.com/gforge)
-
-* Properly emit close events for duplex streams.
- [#2976](https://github.com/lovell/sharp/pull/2976)
- [@driannaude](https://github.com/driannaude)
-
-* Expose `unlimited` option for SVG and PNG input, switches off safety features.
- [#2984](https://github.com/lovell/sharp/issues/2984)
-
-* Add `withoutReduction` option to resize operation.
- [#3006](https://github.com/lovell/sharp/pull/3006)
- [@christopherbradleybanks](https://github.com/christopherbradleybanks)
-
-* Add `resolutionUnit` as `tiff` option and expose in metadata.
- [#3023](https://github.com/lovell/sharp/pull/3023)
- [@ompal-sisodiya](https://github.com/ompal-sisodiya)
-
-* Ensure rotate-then-extract works with EXIF mirroring.
- [#3024](https://github.com/lovell/sharp/issues/3024)
-
-## v0.29 - *circle*
-
-Requires libvips v8.11.3
-
-### v0.29.3 - 14th November 2021
-
-* Ensure correct dimensions when containing image resized to 1px.
- [#2951](https://github.com/lovell/sharp/issues/2951)
-
-* Impute TIFF `xres`/`yres` from `density` provided to `withMetadata`.
- [#2952](https://github.com/lovell/sharp/pull/2952)
- [@mbklein](https://github.com/mbklein)
-
-### v0.29.2 - 21st October 2021
-
-* Add `timeout` function to limit processing time.
-
-* Ensure `sharp.versions` is populated from vendored libvips.
-
-* Remove animation properties from single page images.
- [#2890](https://github.com/lovell/sharp/issues/2890)
-
-* Allow use of 'tif' to select TIFF output.
- [#2893](https://github.com/lovell/sharp/pull/2893)
- [@erf](https://github.com/erf)
-
-* Improve error message on Windows for version conflict.
- [#2918](https://github.com/lovell/sharp/pull/2918)
- [@dkrnl](https://github.com/dkrnl)
-
-* Throw error rather than exit when invalid binaries detected.
- [#2931](https://github.com/lovell/sharp/issues/2931)
-
-### v0.29.1 - 7th September 2021
-
-* Add `lightness` option to `modulate` operation.
- [#2846](https://github.com/lovell/sharp/pull/2846)
-
-* Ensure correct PNG bitdepth is set based on number of colours.
- [#2855](https://github.com/lovell/sharp/issues/2855)
-
-* Ensure background is always premultiplied when compositing.
- [#2858](https://github.com/lovell/sharp/issues/2858)
-
-* Ensure images with P3 profiles retain full gamut.
- [#2862](https://github.com/lovell/sharp/issues/2862)
-
-* Add support for libvips compiled with OpenJPEG.
- [#2868](https://github.com/lovell/sharp/pull/2868)
-
-* Remove unsupported animation properties from AVIF output.
- [#2870](https://github.com/lovell/sharp/issues/2870)
-
-* Resolve paths before comparing input/output filenames.
- [#2878](https://github.com/lovell/sharp/pull/2878)
- [@rexxars](https://github.com/rexxars)
-
-* Allow use of speed 9 (fastest) for HEIF encoding.
- [#2879](https://github.com/lovell/sharp/pull/2879)
- [@rexxars](https://github.com/rexxars)
-
-### v0.29.0 - 17th August 2021
-
-* Drop support for Node.js 10, now requires Node.js >= 12.13.0.
-
-* Add `background` property to PNG and GIF image metadata.
-
-* Add `compression` property to HEIF image metadata.
- [#2504](https://github.com/lovell/sharp/issues/2504)
-
-* AVIF encoding now defaults to `4:4:4` chroma subsampling.
- [#2562](https://github.com/lovell/sharp/issues/2562)
-
-* Allow multiple platform-arch binaries in same `node_modules` installation tree.
- [#2575](https://github.com/lovell/sharp/issues/2575)
-
-* Default to single-channel `b-w` space when `extractChannel` is used.
- [#2658](https://github.com/lovell/sharp/issues/2658)
-
-* Allow installation directory to contain spaces (regression in v0.26.0).
- [#2777](https://github.com/lovell/sharp/issues/2777)
-
-* Add `pipelineColourspace` operator to set the processing space.
- [#2704](https://github.com/lovell/sharp/pull/2704)
- [@Daiz](https://github.com/Daiz)
-
-* Allow bit depth to be set when using raw input and output.
- [#2762](https://github.com/lovell/sharp/pull/2762)
- [@mart-jansink](https://github.com/mart-jansink)
-
-* Allow `negate` to act only on non-alpha channels.
- [#2808](https://github.com/lovell/sharp/pull/2808)
- [@rexxars](https://github.com/rexxars)
-
-## v0.28 - *bijou*
-
-Requires libvips v8.10.6
-
-### v0.28.3 - 24th May 2021
-
-* Ensure presence of libvips, vendored or global, before invoking node-gyp.
-
-* Skip shrink-on-load for multi-page WebP.
- [#2714](https://github.com/lovell/sharp/issues/2714)
-
-* Add contrast limiting adaptive histogram equalization (CLAHE) operator.
- [#2726](https://github.com/lovell/sharp/pull/2726)
- [@baparham](https://github.com/baparham)
-
-### v0.28.2 - 10th May 2021
-
-* Allow `withMetadata` to set `density`.
- [#967](https://github.com/lovell/sharp/issues/967)
-
-* Skip shrink-on-load where one dimension <4px.
- [#2653](https://github.com/lovell/sharp/issues/2653)
-
-* Allow escaped proxy credentials.
- [#2664](https://github.com/lovell/sharp/pull/2664)
- [@msalettes](https://github.com/msalettes)
-
-* Add `premultiplied` flag for raw pixel data input.
- [#2685](https://github.com/lovell/sharp/pull/2685)
- [@mnutt](https://github.com/mnutt)
-
-* Detect empty input and throw a helpful error.
- [#2687](https://github.com/lovell/sharp/pull/2687)
- [@JakobJingleheimer](https://github.com/JakobJingleheimer)
-
-* Add install-time flag to skip version compatibility checks.
- [#2692](https://github.com/lovell/sharp/pull/2692)
- [@xemle](https://github.com/xemle)
-
-### v0.28.1 - 5th April 2021
-
-* Ensure all installation errors are logged with a more obvious prefix.
-
-* Allow `withMetadata` to set and update EXIF metadata.
- [#650](https://github.com/lovell/sharp/issues/650)
-
-* Add support for OME-TIFF Sub Image File Directories (subIFD).
- [#2557](https://github.com/lovell/sharp/issues/2557)
-
-* Allow `ensureAlpha` to set the alpha transparency level.
- [#2634](https://github.com/lovell/sharp/issues/2634)
-
-### v0.28.0 - 29th March 2021
-
-* Prebuilt binaries now include mozjpeg and libimagequant (BSD 2-Clause).
-
-* Prebuilt binaries limit AVIF support to the most common 8-bit depth.
-
-* Add `mozjpeg` option to `jpeg` method, sets mozjpeg defaults.
-
-* Reduce the default PNG `compressionLevel` to the more commonly used 6.
-
-* Reduce concurrency on glibc-based Linux when using the default memory allocator to help prevent fragmentation.
-
-* Default missing edge properties of extend operation to zero.
- [#2578](https://github.com/lovell/sharp/issues/2578)
-
-* Ensure composite does not clip top and left offsets.
- [#2594](https://github.com/lovell/sharp/pull/2594)
- [@SHG42](https://github.com/SHG42)
-
-* Improve error handling of network failure at install time.
- [#2608](https://github.com/lovell/sharp/pull/2608)
- [@abradley](https://github.com/abradley)
-
-* Ensure `@id` attribute can be set for IIIF tile-based output.
- [#2612](https://github.com/lovell/sharp/issues/2612)
- [@edsilv](https://github.com/edsilv)
-
-* Ensure composite replicates the correct number of tiles for centred gravities.
- [#2626](https://github.com/lovell/sharp/issues/2626)
-
-## v0.27 - *avif*
-
-Requires libvips v8.10.5
-
-### v0.27.2 - 22nd February 2021
-
-* macOS: Prevent use of globally-installed ARM64 libvips with Rosetta x64 emulation.
- [#2460](https://github.com/lovell/sharp/issues/2460)
-
-* Linux (musl): Prevent use of prebuilt linuxmusl-x64 binaries with musl >= 1.2.0.
- [#2570](https://github.com/lovell/sharp/issues/2570)
-
-* Improve 16-bit grey+alpha support by using libvips' `has_alpha` detection.
- [#2569](https://github.com/lovell/sharp/issues/2569)
-
-* Allow the use of non lower case extensions with `toFormat`.
- [#2581](https://github.com/lovell/sharp/pull/2581)
- [@florian-busch](https://github.com/florian-busch)
-
-* Allow use of `recomb` operation with single channel input.
- [#2584](https://github.com/lovell/sharp/issues/2584)
-
-### v0.27.1 - 27th January 2021
-
-* Ensure TIFF is cast when using float predictor.
- [#2502](https://github.com/lovell/sharp/pull/2502)
- [@randyridge](https://github.com/randyridge)
-
-* Add support for Uint8Array and Uint8ClampedArray input.
- [#2511](https://github.com/lovell/sharp/pull/2511)
- [@leon](https://github.com/leon)
-
-* Revert: ensure all platforms use fontconfig for font rendering.
- [#2515](https://github.com/lovell/sharp/issues/2515)
-
-* Expose libvips gaussnoise operation to allow creation of Gaussian noise.
- [#2527](https://github.com/lovell/sharp/pull/2527)
- [@alza54](https://github.com/alza54)
-
-### v0.27.0 - 22nd December 2020
-
-* Add support for AVIF to prebuilt binaries.
-
-* Remove experimental status from `heif` output, defaults are now AVIF-centric.
-
-* Allow negative top/left offsets for composite operation.
- [#2391](https://github.com/lovell/sharp/pull/2391)
- [@CurosMJ](https://github.com/CurosMJ)
-
-* Ensure all platforms use fontconfig for font rendering.
- [#2399](https://github.com/lovell/sharp/issues/2399)
-
-## v0.26 - *zoom*
-
-Requires libvips v8.10.0
-
-### v0.26.3 - 16th November 2020
-
-* Expose libvips' affine operation.
- [#2336](https://github.com/lovell/sharp/pull/2336)
- [@guillevc](https://github.com/guillevc)
-
-* Fallback to tar.gz for prebuilt libvips when Brotli not available.
- [#2412](https://github.com/lovell/sharp/pull/2412)
- [@ascorbic](https://github.com/ascorbic)
-
-### v0.26.2 - 14th October 2020
-
-* Add support for EXR input. Requires libvips compiled with OpenEXR.
- [#698](https://github.com/lovell/sharp/issues/698)
-
-* Ensure support for yarn v2.
- [#2379](https://github.com/lovell/sharp/pull/2379)
- [@jalovatt](https://github.com/jalovatt)
-
-* Add centre/center option to tile-based output.
- [#2397](https://github.com/lovell/sharp/pull/2397)
- [@beig](https://github.com/beig)
-
-### v0.26.1 - 20th September 2020
-
-* Ensure correct pageHeight when verifying multi-page image dimensions.
- [#2343](https://github.com/lovell/sharp/pull/2343)
- [@derom](https://github.com/derom)
-
-* Allow input density range up to 100000 DPI.
- [#2348](https://github.com/lovell/sharp/pull/2348)
- [@stefanprobst](https://github.com/stefanprobst)
-
-* Ensure animation-related properties can be set for Stream-based input.
- [#2369](https://github.com/lovell/sharp/pull/2369)
- [@AcrylicShrimp](https://github.com/AcrylicShrimp)
-
-* Ensure `stats` can be calculated for 1x1 input.
- [#2372](https://github.com/lovell/sharp/issues/2372)
-
-* Ensure animated GIF output is optimised.
- [#2376](https://github.com/lovell/sharp/issues/2376)
-
-### v0.26.0 - 25th August 2020
-
-* Prebuilt libvips binaries are now statically-linked and Brotli-compressed, requiring Node.js 10.16.0+.
-
-* TIFF output `squash` is replaced by `bitdepth` to reduce to 1, 2 or 4 bit.
-
-* JPEG output `quality` >= 90 no longer automatically sets `chromaSubsampling` to `4:4:4`.
-
-* Add most `dominant` colour to image `stats`.
- [#640](https://github.com/lovell/sharp/issues/640)
-
-* Add support for animated GIF (requires \*magick) and WebP output.
- [#2012](https://github.com/lovell/sharp/pull/2012)
- [@deftomat](https://github.com/deftomat)
-
-* Add support for libvips ImageMagick v7 loaders.
- [#2258](https://github.com/lovell/sharp/pull/2258)
- [@vouillon](https://github.com/vouillon)
-
-* Allow multi-page input via \*magick.
- [#2259](https://github.com/lovell/sharp/pull/2259)
- [@vouillon](https://github.com/vouillon)
-
-* Add support to `withMetadata` for custom ICC profile.
- [#2271](https://github.com/lovell/sharp/pull/2271)
- [@roborourke](https://github.com/roborourke)
-
-* Ensure prebuilt binaries for ARM default to v7 when using Electron.
- [#2292](https://github.com/lovell/sharp/pull/2292)
- [@diegodev3](https://github.com/diegodev3)
-
-## v0.25 - *yield*
-
-Requires libvips v8.9.1
-
-### v0.25.4 - 12th June 2020
-
-* Allow libvips binary location override where version is appended.
- [#2217](https://github.com/lovell/sharp/pull/2217)
- [@malice00](https://github.com/malice00)
-
-* Enable PNG palette when setting quality, colours, colors or dither.
- [#2226](https://github.com/lovell/sharp/pull/2226)
- [@romaleev](https://github.com/romaleev)
-
-* Add `level` constructor option to use a specific level of a multi-level image.
- Expose `levels` metadata for multi-level images.
- [#2222](https://github.com/lovell/sharp/issues/2222)
-
-* Add support for named `alpha` channel to `extractChannel` operation.
- [#2138](https://github.com/lovell/sharp/issues/2138)
-
-* Add experimental `sharpness` calculation to `stats()` response.
- [#2251](https://github.com/lovell/sharp/issues/2251)
-
-* Emit `warning` event for non-critical processing problems.
- [#2032](https://github.com/lovell/sharp/issues/2032)
-
-### v0.25.3 - 17th May 2020
-
-* Ensure libvips is initialised only once, improves worker thread safety.
- [#2143](https://github.com/lovell/sharp/issues/2143)
-
-* Ensure npm platform flag is respected when copying DLLs.
- [#2188](https://github.com/lovell/sharp/pull/2188)
- [@dimadeveatii](https://github.com/dimadeveatii)
-
-* Allow SVG input with large inline images to be parsed.
- [#2195](https://github.com/lovell/sharp/issues/2195)
-
-### v0.25.2 - 20th March 2020
-
-* Provide prebuilt binaries for Linux ARM64v8.
-
-* Add IIIF layout support to tile-based output.
- [#2098](https://github.com/lovell/sharp/pull/2098)
- [@edsilv](https://github.com/edsilv)
-
-* Ensure input options are consistently and correctly detected.
- [#2118](https://github.com/lovell/sharp/issues/2118)
-
-* Ensure N-API prebuilt binaries work on RHEL7 and its derivatives.
- [#2119](https://github.com/lovell/sharp/issues/2119)
-
-* Ensure AsyncWorker options are persisted.
- [#2130](https://github.com/lovell/sharp/issues/2130)
-
-### v0.25.1 - 7th March 2020
-
-* Ensure prebuilt binaries are fetched based on N-API version.
- [#2117](https://github.com/lovell/sharp/issues/2117)
-
-### v0.25.0 - 7th March 2020
-
-* Remove `limitInputPixels` and `sequentialRead` previously deprecated in v0.24.0.
-
-* Migrate internals to N-API.
- [#1282](https://github.com/lovell/sharp/issues/1282)
-
-* Add support for 32-bit Windows.
- [#2088](https://github.com/lovell/sharp/issues/2088)
-
-* Ensure correct ordering of rotate-then-trim operations.
- [#2087](https://github.com/lovell/sharp/issues/2087)
-
-* Ensure composite accepts `limitInputPixels` and `sequentialRead` input options.
- [#2099](https://github.com/lovell/sharp/issues/2099)
-
-## v0.24 - "*wit*"
-
-Requires libvips v8.9.0.
-
-### v0.24.1 - 15th February 2020
-
-* Prevent use of sequentialRead for EXIF-based rotate operation.
- [#2042](https://github.com/lovell/sharp/issues/2042)
-
-* Ensure RGBA LZW TIFF returns correct channel count.
- [#2064](https://github.com/lovell/sharp/issues/2064)
-
-### v0.24.0 - 16th January 2020
-
-* Drop support for Node.js 8.
- [#1910](https://github.com/lovell/sharp/issues/1910)
-
-* Drop support for undefined input where options also provided.
- [#1768](https://github.com/lovell/sharp/issues/1768)
-
-* Move `limitInputPixels` and `sequentialRead` to input options, deprecating functions of the same name.
-
-* Expose `delay` and `loop` metadata for animated images.
- [#1905](https://github.com/lovell/sharp/issues/1905)
-
-* Ensure correct colour output for 16-bit, 2-channel PNG input with ICC profile.
- [#2013](https://github.com/lovell/sharp/issues/2013)
-
-* Prevent use of sequentialRead for rotate operations.
- [#2016](https://github.com/lovell/sharp/issues/2016)
-
-* Correctly bind max width and height values when using withoutEnlargement.
- [#2024](https://github.com/lovell/sharp/pull/2024)
- [@BrychanOdlum](https://github.com/BrychanOdlum)
-
-* Add support for input with 16-bit RGB profile.
- [#2037](https://github.com/lovell/sharp/issues/2037)
-
-## v0.23 - "*vision*"
-
-Requires libvips v8.8.1.
-
-### v0.23.4 - 5th December 2019
-
-* Handle zero-length Buffer objects when using Node.js v13.2.0+.
-
-* Expose raw TIFFTAG_PHOTOSHOP metadata.
- [#1600](https://github.com/lovell/sharp/issues/1600)
-
-* Improve thread safety by using copy-on-write when updating metadata.
- [#1986](https://github.com/lovell/sharp/issues/1986)
-
-### v0.23.3 - 17th November 2019
-
-* Ensure `trim` operation supports images contained in the alpha channel.
- [#1597](https://github.com/lovell/sharp/issues/1597)
-
-* Ensure tile `overlap` option works as expected.
- [#1921](https://github.com/lovell/sharp/pull/1921)
- [@rustyguts](https://github.com/rustyguts)
-
-* Allow compilation on FreeBSD and variants (broken since v0.23.0)
- [#1952](https://github.com/lovell/sharp/pull/1952)
- [@pouya-eghbali](https://github.com/pouya-eghbali)
-
-* Ensure `modulate` and other colour-based operations can co-exist.
- [#1958](https://github.com/lovell/sharp/issues/1958)
-
-### v0.23.2 - 28th October 2019
-
-* Add `background` option to tile output operation.
- [#1924](https://github.com/lovell/sharp/pull/1924)
- [@neave](https://github.com/neave)
-
-* Add support for Node.js 13.
- [#1932](https://github.com/lovell/sharp/pull/1932)
- [@MayhemYDG](https://github.com/MayhemYDG)
-
-### v0.23.1 - 26th September 2019
-
-* Ensure `sharp.format.vips` is present and correct (filesystem only).
- [#1813](https://github.com/lovell/sharp/issues/1813)
-
-* Ensure invalid `width` and `height` provided as options to `resize` throw.
- [#1817](https://github.com/lovell/sharp/issues/1817)
-
-* Allow use of 'heic' and 'heif' identifiers with `toFormat`.
- [#1834](https://github.com/lovell/sharp/pull/1834)
- [@jaubourg](https://github.com/jaubourg)
-
-* Add `premultiplied` option to `composite` operation.
- [#1835](https://github.com/lovell/sharp/pull/1835)
- [@Andargor](https://github.com/Andargor)
-
-* Allow instance reuse with differing `toBuffer` options.
- [#1860](https://github.com/lovell/sharp/pull/1860)
- [@RaboliotTheGrey](https://github.com/RaboliotTheGrey)
-
-* Ensure image is at least 3x3 pixels before attempting trim operation.
-
-### v0.23.0 - 29th July 2019
-
-* Remove `overlayWith` previously deprecated in v0.22.0.
-
-* Add experimental support for HEIF images. Requires libvips compiled with libheif.
- [#1105](https://github.com/lovell/sharp/issues/1105)
-
-* Expose libwebp `smartSubsample` and `reductionEffort` options.
- [#1545](https://github.com/lovell/sharp/issues/1545)
-
-* Add experimental support for Worker Threads.
- [#1558](https://github.com/lovell/sharp/issues/1558)
-
-* Use libvips' built-in CMYK and sRGB profiles when required.
- [#1619](https://github.com/lovell/sharp/issues/1619)
-
-* Drop support for Node.js versions 6 and 11.
- [#1674](https://github.com/lovell/sharp/issues/1674)
-
-* Expose `skipBlanks` option for tile-based output.
- [#1687](https://github.com/lovell/sharp/pull/1687)
- [@RaboliotTheGrey](https://github.com/RaboliotTheGrey)
-
-* Allow use of `failOnError` option with Stream-based input.
- [#1691](https://github.com/lovell/sharp/issues/1691)
-
-* Fix rotate/extract ordering for non-90 angles.
- [#1755](https://github.com/lovell/sharp/pull/1755)
- [@iovdin](https://github.com/iovdin)
-
-## v0.22 - "*uptake*"
-
-Requires libvips v8.7.4.
-
-### v0.22.1 - 25th April 2019
-
-* Add `modulate` operation for brightness, saturation and hue.
- [#1601](https://github.com/lovell/sharp/pull/1601)
- [@Goues](https://github.com/Goues)
-
-* Improve help messaging should `require("sharp")` fail.
- [#1638](https://github.com/lovell/sharp/pull/1638)
- [@sidharthachatterjee](https://github.com/sidharthachatterjee)
-
-* Add support for Node 12.
- [#1668](https://github.com/lovell/sharp/issues/1668)
-
-### v0.22.0 - 18th March 2019
-
-* Remove functions previously deprecated in v0.21.0:
- `background`, `crop`, `embed`, `ignoreAspectRatio`, `max`, `min` and `withoutEnlargement`.
-
-* Add `composite` operation supporting multiple images and blend modes; deprecate `overlayWith`.
- [#728](https://github.com/lovell/sharp/issues/728)
-
-* Add support for `pages` input option for multi-page input.
- [#1566](https://github.com/lovell/sharp/issues/1566)
-
-* Allow Stream-based input of raw pixel data.
- [#1579](https://github.com/lovell/sharp/issues/1579)
-
-* Add support for `page` input option to GIF and PDF.
- [#1595](https://github.com/lovell/sharp/pull/1595)
- [@ramiel](https://github.com/ramiel)
-
-## v0.21 - "*teeth*"
-
-Requires libvips v8.7.0.
-
-### v0.21.3 - 19th January 2019
-
-* Input image decoding now fails fast, set `failOnError` to change this behaviour.
-
-* Failed filesystem-based input now separates missing file and invalid format errors.
- [#1542](https://github.com/lovell/sharp/issues/1542)
-
-### v0.21.2 - 13th January 2019
-
-* Ensure all metadata is removed from PNG output unless `withMetadata` used.
-
-* Ensure shortest edge is at least one pixel after resizing.
- [#1003](https://github.com/lovell/sharp/issues/1003)
-
-* Add `ensureAlpha` operation to add an alpha channel, if missing.
- [#1153](https://github.com/lovell/sharp/issues/1153)
-
-* Expose `pages` and `pageHeight` metadata for multi-page input images.
- [#1205](https://github.com/lovell/sharp/issues/1205)
-
-* Expose PNG output options requiring libimagequant.
- [#1484](https://github.com/lovell/sharp/issues/1484)
-
-* Expose underlying error message for invalid input.
- [#1505](https://github.com/lovell/sharp/issues/1505)
-
-* Prevent mutatation of options passed to `jpeg`.
- [#1516](https://github.com/lovell/sharp/issues/1516)
-
-* Ensure forced output format applied correctly when output chaining.
- [#1528](https://github.com/lovell/sharp/issues/1528)
-
-### v0.21.1 - 7th December 2018
-
-* Install: support `sharp_dist_base_url` npm config, like existing `SHARP_DIST_BASE_URL`.
- [#1422](https://github.com/lovell/sharp/pull/1422)
- [@SethWen](https://github.com/SethWen)
-
-* Ensure `channel` metadata is correct for raw, greyscale output.
- [#1425](https://github.com/lovell/sharp/issues/1425)
-
-* Add support for the "mitchell" kernel for image reductions.
- [#1438](https://github.com/lovell/sharp/pull/1438)
- [@Daiz](https://github.com/Daiz)
-
-* Allow separate parameters for gamma encoding and decoding.
- [#1439](https://github.com/lovell/sharp/pull/1439)
- [@Daiz](https://github.com/Daiz)
-
-* Build prototype with `Object.assign` to allow minification.
- [#1475](https://github.com/lovell/sharp/pull/1475)
- [@jaubourg](https://github.com/jaubourg)
-
-* Expose libvips' recombination matrix operation.
- [#1477](https://github.com/lovell/sharp/pull/1477)
- [@fromkeith](https://github.com/fromkeith)
-
-* Expose libvips' pyramid/tile options for TIFF output.
- [#1483](https://github.com/lovell/sharp/pull/1483)
- [@mbklein](https://github.com/mbklein)
-
-### v0.21.0 - 4th October 2018
-
-* Deprecate the following resize-related functions:
- `crop`, `embed`, `ignoreAspectRatio`, `max`, `min` and `withoutEnlargement`.
- Access to these is now via options passed to the `resize` function.
- For example:
- `embed('north')` is now `resize(width, height, { fit: 'contain', position: 'north' })`,
- `crop('attention')` is now `resize(width, height, { fit: 'cover', position: 'attention' })`,
- `max().withoutEnlargement()` is now `resize(width, height, { fit: 'inside', withoutEnlargement: true })`.
- [#1135](https://github.com/lovell/sharp/issues/1135)
-
-* Deprecate the `background` function.
- Per-operation `background` options added to `resize`, `extend` and `flatten` operations.
- [#1392](https://github.com/lovell/sharp/issues/1392)
-
-* Add `size` to `metadata` response (Stream and Buffer input only).
- [#695](https://github.com/lovell/sharp/issues/695)
-
-* Switch from custom trim operation to `vips_find_trim`.
- [#914](https://github.com/lovell/sharp/issues/914)
-
-* Add `chromaSubsampling` and `isProgressive` properties to `metadata` response.
- [#1186](https://github.com/lovell/sharp/issues/1186)
-
-* Drop Node 4 support.
- [#1212](https://github.com/lovell/sharp/issues/1212)
-
-* Enable SIMD convolution by default.
- [#1213](https://github.com/lovell/sharp/issues/1213)
-
-* Add experimental prebuilt binaries for musl-based Linux.
- [#1379](https://github.com/lovell/sharp/issues/1379)
-
-* Add support for arbitrary rotation angle via vips_rotate.
- [#1385](https://github.com/lovell/sharp/pull/1385)
- [@freezy](https://github.com/freezy)
-
-## v0.20 - "*prebuild*"
-
-Requires libvips v8.6.1.
-
-### v0.20.8 - 5th September 2018
-
-* Avoid race conditions when creating directories during installation.
- [#1358](https://github.com/lovell/sharp/pull/1358)
- [@ajhool](https://github.com/ajhool)
-
-* Accept floating point values for input density parameter.
- [#1362](https://github.com/lovell/sharp/pull/1362)
- [@aeirola](https://github.com/aeirola)
-
-### v0.20.7 - 21st August 2018
-
-* Use copy+unlink if rename operation fails during installation.
- [#1345](https://github.com/lovell/sharp/issues/1345)
-
-### v0.20.6 - 20th August 2018
-
-* Add removeAlpha operation to remove alpha channel, if any.
- [#1248](https://github.com/lovell/sharp/issues/1248)
-
-* Expose mozjpeg quant_table flag.
- [#1285](https://github.com/lovell/sharp/pull/1285)
- [@rexxars](https://github.com/rexxars)
-
-* Allow full WebP alphaQuality range of 0-100.
- [#1290](https://github.com/lovell/sharp/pull/1290)
- [@sylvaindumont](https://github.com/sylvaindumont)
-
-* Cache libvips binaries to reduce re-install time.
- [#1301](https://github.com/lovell/sharp/issues/1301)
-
-* Ensure vendor platform mismatch throws error at install time.
- [#1303](https://github.com/lovell/sharp/issues/1303)
-
-* Improve install time error messages for FreeBSD users.
- [#1310](https://github.com/lovell/sharp/issues/1310)
-
-* Ensure extractChannel works with 16-bit images.
- [#1330](https://github.com/lovell/sharp/issues/1330)
-
-* Expose depth option for tile-based output.
- [#1342](https://github.com/lovell/sharp/pull/1342)
- [@alundavies](https://github.com/alundavies)
-
-* Add experimental entropy field to stats response.
-
-### v0.20.5 - 27th June 2018
-
-* Expose libjpeg optimize_coding flag.
- [#1265](https://github.com/lovell/sharp/pull/1265)
- [@tomlokhorst](https://github.com/tomlokhorst)
-
-### v0.20.4 - 20th June 2018
-
-* Prevent possible rounding error when using shrink-on-load and 90/270 degree rotation.
- [#1241](https://github.com/lovell/sharp/issues/1241)
- [@anahit42](https://github.com/anahit42)
-
-* Ensure extractChannel sets correct single-channel colour space interpretation.
- [#1257](https://github.com/lovell/sharp/issues/1257)
- [@jeremychone](https://github.com/jeremychone)
-
-### v0.20.3 - 29th May 2018
-
-* Fix tint operation by ensuring LAB interpretation and allowing negative values.
- [#1235](https://github.com/lovell/sharp/issues/1235)
- [@wezside](https://github.com/wezside)
-
-### v0.20.2 - 28th April 2018
-
-* Add tint operation to set image chroma.
- [#825](https://github.com/lovell/sharp/pull/825)
- [@rikh42](https://github.com/rikh42)
-
-* Add environment variable to ignore globally-installed libvips.
- [#1165](https://github.com/lovell/sharp/pull/1165)
- [@oncletom](https://github.com/oncletom)
-
-* Add support for page selection with multi-page input (GIF/TIFF).
- [#1204](https://github.com/lovell/sharp/pull/1204)
- [@woolite64](https://github.com/woolite64)
-
-* Add support for Group4 (CCITTFAX4) compression with TIFF output.
- [#1208](https://github.com/lovell/sharp/pull/1208)
- [@woolite64](https://github.com/woolite64)
-
-### v0.20.1 - 17th March 2018
-
-* Improve installation experience when a globally-installed libvips below the minimum required version is found.
- [#1148](https://github.com/lovell/sharp/issues/1148)
-
-* Prevent smartcrop error when cumulative rounding is below target size.
- [#1154](https://github.com/lovell/sharp/issues/1154)
- [@ralrom](https://github.com/ralrom)
-
-* Expose libvips' median filter operation.
- [#1161](https://github.com/lovell/sharp/pull/1161)
- [@BiancoA](https://github.com/BiancoA)
-
-### v0.20.0 - 5th March 2018
-
-* Add support for prebuilt sharp binaries on common platforms.
- [#186](https://github.com/lovell/sharp/issues/186)
-
-## v0.19 - "*suit*"
-
-Requires libvips v8.6.1.
-
-### v0.19.1 - 24th February 2018
-
-* Expose libvips' linear transform feature.
- [#1024](https://github.com/lovell/sharp/pull/1024)
- [@3epnm](https://github.com/3epnm)
-
-* Expose angle option for tile-based output.
- [#1121](https://github.com/lovell/sharp/pull/1121)
- [@BiancoA](https://github.com/BiancoA)
-
-* Prevent crop operation when image already at or below target dimensions.
- [#1134](https://github.com/lovell/sharp/issues/1134)
- [@pieh](https://github.com/pieh)
-
-### v0.19.0 - 11th January 2018
-
-* Expose offset coordinates of strategy-based crop.
- [#868](https://github.com/lovell/sharp/issues/868)
- [@mirohristov-com](https://github.com/mirohristov-com)
-
-* PNG output now defaults to adaptiveFiltering=false, compressionLevel=9
- [#872](https://github.com/lovell/sharp/issues/872)
- [@wmertens](https://github.com/wmertens)
-
-* Add stats feature for pixel-derived image statistics.
- [#915](https://github.com/lovell/sharp/pull/915)
- [@rnanwani](https://github.com/rnanwani)
-
-* Add failOnError option to fail-fast on bad input image data.
- [#976](https://github.com/lovell/sharp/pull/976)
- [@mceachen](https://github.com/mceachen)
-
-* Resize: switch to libvips' implementation, make fastShrinkOnLoad optional, remove interpolator and centreSampling options.
- [#977](https://github.com/lovell/sharp/pull/977)
- [@jardakotesovec](https://github.com/jardakotesovec)
-
-* Attach finish event listener to a clone only for Stream-based input.
- [#995](https://github.com/lovell/sharp/issues/995)
- [@whmountains](https://github.com/whmountains)
-
-* Add tilecache before smartcrop to avoid over-computation of previous operations.
- [#1028](https://github.com/lovell/sharp/issues/1028)
- [@coffeebite](https://github.com/coffeebite)
-
-* Prevent toFile extension taking precedence over requested format.
- [#1037](https://github.com/lovell/sharp/issues/1037)
- [@tomgallagher](https://github.com/tomgallagher)
-
-* Add support for gravity option to existing embed feature.
- [#1038](https://github.com/lovell/sharp/pull/1038)
- [@AzureByte](https://github.com/AzureByte)
-
-* Expose IPTC and XMP metadata when available.
- [#1079](https://github.com/lovell/sharp/pull/1079)
- [@oaleynik](https://github.com/oaleynik)
-
-* TIFF output: switch default predictor from 'none' to 'horizontal' to match libvips' behaviour.
-
-## v0.18 - "*ridge*"
-
-Requires libvips v8.5.5.
-
-### v0.18.4 - 18th September 2017
-
-* Ensure input Buffer really is marked as Persistent, prevents mark-sweep GC.
- [#950](https://github.com/lovell/sharp/issues/950)
- [@lfdoherty](https://github.com/lfdoherty)
-
-### v0.18.3 - 13th September 2017
-
-* Skip shrink-on-load when trimming.
- [#888](https://github.com/lovell/sharp/pull/888)
- [@kleisauke](https://github.com/kleisauke)
-
-* Migrate from got to simple-get for basic auth support.
- [#945](https://github.com/lovell/sharp/pull/945)
- [@pbomb](https://github.com/pbomb)
-
-### v0.18.2 - 1st July 2017
-
-* Expose libvips' xres and yres properties for TIFF output.
- [#828](https://github.com/lovell/sharp/pull/828)
- [@YvesBos](https://github.com/YvesBos)
-
-* Ensure flip and flop operations work with auto-rotate.
- [#837](https://github.com/lovell/sharp/issues/837)
- [@rexxars](https://github.com/rexxars)
-
-* Allow binary download URL override via SHARP_DIST_BASE_URL env variable.
- [#841](https://github.com/lovell/sharp/issues/841)
-
-* Add support for Solus Linux.
- [#857](https://github.com/lovell/sharp/pull/857)
- [@ekremkaraca](https://github.com/ekremkaraca)
-
-### v0.18.1 - 30th May 2017
-
-* Remove regression from #781 that could cause incorrect shrink calculation.
- [#831](https://github.com/lovell/sharp/issues/831)
- [@suprMax](https://github.com/suprMax)
-
-### v0.18.0 - 30th May 2017
-
-* Remove the previously-deprecated output format "option" functions:
- quality, progressive, compressionLevel, withoutAdaptiveFiltering,
- withoutChromaSubsampling, trellisQuantisation, trellisQuantization,
- overshootDeringing, optimiseScans and optimizeScans.
-
-* Ensure maximum output dimensions are based on the format to be used.
- [#176](https://github.com/lovell/sharp/issues/176)
- [@stephanebachelier](https://github.com/stephanebachelier)
-
-* Avoid costly (un)premultiply when using overlayWith without alpha channel.
- [#573](https://github.com/lovell/sharp/issues/573)
- [@strarsis](https://github.com/strarsis)
-
-* Include pixel depth (e.g. "uchar") when reading metadata.
- [#577](https://github.com/lovell/sharp/issues/577)
- [@moedusa](https://github.com/moedusa)
-
-* Add support for Buffer and Stream-based TIFF output.
- [#587](https://github.com/lovell/sharp/issues/587)
- [@strarsis](https://github.com/strarsis)
-
-* Expose warnings from libvips via NODE_DEBUG=sharp environment variable.
- [#607](https://github.com/lovell/sharp/issues/607)
- [@puzrin](https://github.com/puzrin)
-
-* Switch to the libvips implementation of "attention" and "entropy" crop strategies.
- [#727](https://github.com/lovell/sharp/issues/727)
-
-* Improve performance and accuracy of nearest neighbour integral upsampling.
- [#752](https://github.com/lovell/sharp/issues/752)
- [@MrIbby](https://github.com/MrIbby)
-
-* Constructor single argument API: allow plain object, reject null/undefined.
- [#768](https://github.com/lovell/sharp/issues/768)
- [@kub1x](https://github.com/kub1x)
-
-* Ensure ARM64 pre-built binaries use correct C++11 ABI version.
- [#772](https://github.com/lovell/sharp/issues/772)
- [@ajiratech2](https://github.com/ajiratech2)
-
-* Prevent aliasing by using dynamic values for shrink(-on-load).
- [#781](https://github.com/lovell/sharp/issues/781)
- [@kleisauke](https://github.com/kleisauke)
-
-* Expose libvips' "squash" parameter to enable 1-bit TIFF output.
- [#783](https://github.com/lovell/sharp/pull/783)
- [@YvesBos](https://github.com/YvesBos)
-
-* Add support for rotation using any multiple of +/-90 degrees.
- [#791](https://github.com/lovell/sharp/pull/791)
- [@ncoden](https://github.com/ncoden)
-
-* Add "jpg" alias to toFormat as shortened form of "jpeg".
- [#814](https://github.com/lovell/sharp/pull/814)
- [@jingsam](https://github.com/jingsam)
-
-## v0.17 - "*quill*"
-
-Requires libvips v8.4.2.
-
-### v0.17.3 - 1st April 2017
-
-* Allow toBuffer to optionally resolve a Promise with both info and data.
- [#143](https://github.com/lovell/sharp/issues/143)
- [@salzhrani](https://github.com/salzhrani)
-
-* Create blank image of given width, height, channels and background.
- [#470](https://github.com/lovell/sharp/issues/470)
- [@pjarts](https://github.com/pjarts)
-
-* Add support for the "nearest" kernel for image reductions.
- [#732](https://github.com/lovell/sharp/pull/732)
- [@alice0meta](https://github.com/alice0meta)
-
-* Add support for TIFF compression and predictor options.
- [#738](https://github.com/lovell/sharp/pull/738)
- [@kristojorg](https://github.com/kristojorg)
-
-### v0.17.2 - 11th February 2017
-
-* Ensure Readable side of Stream can start flowing after Writable side has finished.
- [#671](https://github.com/lovell/sharp/issues/671)
- [@danhaller](https://github.com/danhaller)
-
-* Expose WebP alpha quality, lossless and near-lossless output options.
- [#685](https://github.com/lovell/sharp/pull/685)
- [@rnanwani](https://github.com/rnanwani)
-
-### v0.17.1 - 15th January 2017
-
-* Improve error messages for invalid parameters.
- [@spikeon](https://github.com/spikeon)
- [#644](https://github.com/lovell/sharp/pull/644)
-
-* Simplify expression for finding vips-cpp libdir.
- [#656](https://github.com/lovell/sharp/pull/656)
-
-* Allow HTTPS-over-HTTP proxy when downloading pre-compiled dependencies.
- [@wangzhiwei1888](https://github.com/wangzhiwei1888)
- [#679](https://github.com/lovell/sharp/issues/679)
-
-### v0.17.0 - 11th December 2016
-
-* Drop support for versions of Node prior to v4.
-
-* Deprecate the following output format "option" functions:
- quality, progressive, compressionLevel, withoutAdaptiveFiltering,
- withoutChromaSubsampling, trellisQuantisation, trellisQuantization,
- overshootDeringing, optimiseScans and optimizeScans.
- Access to these is now via output format functions, for example `quality(n)`
- is now `jpeg({quality: n})` and/or `webp({quality: n})`.
-
-* Autoconvert GIF and SVG input to PNG output if no other format is specified.
-
-* Expose libvips' "centre" resize option to mimic \*magick's +0.5px convention.
- [#568](https://github.com/lovell/sharp/issues/568)
-
-* Ensure support for embedded base64 PNG and JPEG images within an SVG.
- [#601](https://github.com/lovell/sharp/issues/601)
- [@dynamite-ready](https://github.com/dynamite-ready)
-
-* Ensure premultiply operation occurs before box filter shrink.
- [#605](https://github.com/lovell/sharp/issues/605)
- [@CmdrShepardsPie](https://github.com/CmdrShepardsPie)
- [@teroparvinen](https://github.com/teroparvinen)
-
-* Add support for PNG and WebP tile-based output formats (in addition to JPEG).
- [#622](https://github.com/lovell/sharp/pull/622)
- [@ppaskaris](https://github.com/ppaskaris)
-
-* Allow use of extend with greyscale input.
- [#623](https://github.com/lovell/sharp/pull/623)
- [@ppaskaris](https://github.com/ppaskaris)
-
-* Allow non-RGB input to embed/extend onto background with an alpha channel.
- [#646](https://github.com/lovell/sharp/issues/646)
- [@DaGaMs](https://github.com/DaGaMs)
-
-## v0.16 - "*pencil*"
-
-Requires libvips v8.3.3
-
-### v0.16.2 - 22nd October 2016
-
-* Restrict readelf usage to Linux only when detecting global libvips version.
- [#602](https://github.com/lovell/sharp/issues/602)
- [@caoko](https://github.com/caoko)
-
-### v0.16.1 - 13th October 2016
-
-* C++11 ABI version is now auto-detected, remove sharp-cxx11 installation flag.
-
-* Add experimental 'attention' crop strategy.
- [#295](https://github.com/lovell/sharp/issues/295)
-
-* Include .node extension for Meteor's require() implementation.
- [#537](https://github.com/lovell/sharp/issues/537)
- [@isjackwild](https://github.com/isjackwild)
-
-* Ensure convolution kernel scale is clamped to a minimum value of 1.
- [#561](https://github.com/lovell/sharp/issues/561)
- [@abagshaw](https://github.com/abagshaw)
-
-* Correct calculation of y-axis placement when overlaying image at a fixed point.
- [#566](https://github.com/lovell/sharp/issues/566)
- [@Nateowami](https://github.com/Nateowami)
-
-### v0.16.0 - 18th August 2016
-
-* Add pre-compiled libvips for OS X, ARMv7 and ARMv8.
- [#312](https://github.com/lovell/sharp/issues/312)
-
-* Ensure boolean, bandbool, extractChannel ops occur before sRGB conversion.
- [#504](https://github.com/lovell/sharp/pull/504)
- [@mhirsch](https://github.com/mhirsch)
-
-* Recalculate factors after WebP shrink-on-load to avoid round-to-zero errors.
- [#508](https://github.com/lovell/sharp/issues/508)
- [@asilvas](https://github.com/asilvas)
-
-* Prevent boolean errors during extract operation.
- [#511](https://github.com/lovell/sharp/pull/511)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add joinChannel and toColourspace/toColorspace operations.
- [#513](https://github.com/lovell/sharp/pull/513)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add support for raw pixel data with boolean and withOverlay operations.
- [#516](https://github.com/lovell/sharp/pull/516)
- [@mhirsch](https://github.com/mhirsch)
-
-* Prevent bandbool creating a single channel sRGB image.
- [#519](https://github.com/lovell/sharp/pull/519)
- [@mhirsch](https://github.com/mhirsch)
-
-* Ensure ICC profiles are removed from PNG output unless withMetadata used.
- [#521](https://github.com/lovell/sharp/issues/521)
- [@ChrisPinewood](https://github.com/ChrisPinewood)
-
-* Add alpha channels, if missing, to overlayWith images.
- [#540](https://github.com/lovell/sharp/pull/540)
- [@cmtt](https://github.com/cmtt)
-
-* Remove deprecated interpolateWith method - use resize(w, h, { interpolator: ... })
- [#310](https://github.com/lovell/sharp/issues/310)
-
-## v0.15 - "*outfit*"
-
-Requires libvips v8.3.1
-
-### v0.15.1 - 12th July 2016
-
-* Concat Stream-based input in single operation for ~+3% perf and less GC.
- [#429](https://github.com/lovell/sharp/issues/429)
- [@papandreou](https://github.com/papandreou)
-
-* Add alpha channel, if required, before extend operation.
- [#439](https://github.com/lovell/sharp/pull/439)
- [@frulo](https://github.com/frulo)
-
-* Allow overlay image to be repeated across entire image via tile option.
- [#443](https://github.com/lovell/sharp/pull/443)
- [@lemnisk8](https://github.com/lemnisk8)
-
-* Add cutout option to overlayWith feature, applies only the alpha channel of the overlay image.
- [#448](https://github.com/lovell/sharp/pull/448)
- [@kleisauke](https://github.com/kleisauke)
-
-* Ensure scaling factors are calculated independently to prevent rounding errors.
- [#452](https://github.com/lovell/sharp/issues/452)
- [@puzrin](https://github.com/puzrin)
-
-* Add --sharp-cxx11 flag to compile with gcc's new C++11 ABI.
- [#456](https://github.com/lovell/sharp/pull/456)
- [@kapouer](https://github.com/kapouer)
-
-* Add top/left offset support to overlayWith operation.
- [#473](https://github.com/lovell/sharp/pull/473)
- [@rnanwani](https://github.com/rnanwani)
-
-* Add convolve operation for kernel-based convolution.
- [#479](https://github.com/lovell/sharp/pull/479)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add greyscale option to threshold operation for colourspace conversion control.
- [#480](https://github.com/lovell/sharp/pull/480)
- [@mhirsch](https://github.com/mhirsch)
-
-* Ensure ICC profiles are licenced for distribution.
- [#486](https://github.com/lovell/sharp/issues/486)
- [@kapouer](https://github.com/kapouer)
-
-* Allow images with an alpha channel to work with LAB-colourspace based sharpen.
- [#490](https://github.com/lovell/sharp/issues/490)
- [@jwagner](https://github.com/jwagner)
-
-* Add trim operation to remove "boring" edges.
- [#492](https://github.com/lovell/sharp/pull/492)
- [@kleisauke](https://github.com/kleisauke)
-
-* Add bandbool feature for channel-wise boolean operations.
- [#496](https://github.com/lovell/sharp/pull/496)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add extractChannel operation to extract a channel from an image.
- [#497](https://github.com/lovell/sharp/pull/497)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add ability to read and write native libvips .v files.
- [#500](https://github.com/lovell/sharp/pull/500)
- [@mhirsch](https://github.com/mhirsch)
-
-* Add boolean feature for bitwise image operations.
- [#501](https://github.com/lovell/sharp/pull/501)
- [@mhirsch](https://github.com/mhirsch)
-
-### v0.15.0 - 21st May 2016
-
-* Use libvips' new Lanczos 3 kernel as default for image reduction.
- Deprecate interpolateWith method, now provided as a resize option.
- [#310](https://github.com/lovell/sharp/issues/310)
- [@jcupitt](https://github.com/jcupitt)
-
-* Take advantage of libvips v8.3 features.
- Add support for libvips' new GIF and SVG loaders.
- Pre-built binaries now include giflib and librsvg, exclude *magick.
- Use shrink-on-load for WebP input.
- Break existing sharpen API to accept sigma and improve precision.
- [#369](https://github.com/lovell/sharp/issues/369)
-
-* Remove unnecessary (un)premultiply operations when not resizing/compositing.
- [#413](https://github.com/lovell/sharp/issues/413)
- [@jardakotesovec](https://github.com/jardakotesovec)
-
-## v0.14 - "*needle*"
-
-Requires libvips v8.2.3
-
-### v0.14.1 - 16th April 2016
-
-* Allow removal of limitation on input pixel count via limitInputPixels. Use with care.
- [#250](https://github.com/lovell/sharp/issues/250)
- [#316](https://github.com/lovell/sharp/pull/316)
- [@anandthakker](https://github.com/anandthakker)
- [@kentongray](https://github.com/kentongray)
-
-* Use final output image for metadata passed to callback.
- [#399](https://github.com/lovell/sharp/pull/399)
- [@salzhrani](https://github.com/salzhrani)
-
-* Add support for writing tiled images to a zip container.
- [#402](https://github.com/lovell/sharp/pull/402)
- [@felixbuenemann](https://github.com/felixbuenemann)
-
-* Allow use of embed with 1 and 2 channel images.
- [#411](https://github.com/lovell/sharp/issues/411)
- [@janaz](https://github.com/janaz)
-
-* Improve Electron compatibility by allowing node-gyp rebuilds without npm.
- [#412](https://github.com/lovell/sharp/issues/412)
- [@nouh](https://github.com/nouh)
-
-### v0.14.0 - 2nd April 2016
-
-* Add ability to extend (pad) the edges of an image.
- [#128](https://github.com/lovell/sharp/issues/128)
- [@blowsie](https://github.com/blowsie)
-
-* Add support for Zoomify and Google tile layouts. Breaks existing tile API.
- [#223](https://github.com/lovell/sharp/issues/223)
- [@bdunnette](https://github.com/bdunnette)
-
-* Improvements to overlayWith: differing sizes/formats, gravity, buffer input.
- [#239](https://github.com/lovell/sharp/issues/239)
- [@chrisriley](https://github.com/chrisriley)
-
-* Add entropy-based crop strategy to remove least interesting edges.
- [#295](https://github.com/lovell/sharp/issues/295)
- [@rightaway](https://github.com/rightaway)
-
-* Expose density metadata; set density of images from vector input.
- [#338](https://github.com/lovell/sharp/issues/338)
- [@lookfirst](https://github.com/lookfirst)
-
-* Emit post-processing 'info' event for Stream output.
- [#367](https://github.com/lovell/sharp/issues/367)
- [@salzhrani](https://github.com/salzhrani)
-
-* Ensure output image EXIF Orientation values are within 1-8 range.
- [#385](https://github.com/lovell/sharp/pull/385)
- [@jtobinisaniceguy](https://github.com/jtobinisaniceguy)
-
-* Ensure ratios are not swapped when rotating 90/270 and ignoring aspect.
- [#387](https://github.com/lovell/sharp/issues/387)
- [@kleisauke](https://github.com/kleisauke)
-
-* Remove deprecated style of calling extract API. Breaks calls using positional arguments.
- [#276](https://github.com/lovell/sharp/issues/276)
-
-## v0.13 - "*mind*"
-
-Requires libvips v8.2.2
-
-### v0.13.1 - 27th February 2016
-
-* Fix embedding onto transparent backgrounds; regression introduced in v0.13.0.
- [#366](https://github.com/lovell/sharp/issues/366)
- [@diegocsandrim](https://github.com/diegocsandrim)
-
-### v0.13.0 - 15th February 2016
-
-* Improve vector image support by allowing control of density/DPI.
- Switch pre-built libs from Imagemagick to Graphicsmagick.
- [#110](https://github.com/lovell/sharp/issues/110)
- [@bradisbell](https://github.com/bradisbell)
-
-* Add support for raw, uncompressed pixel Buffer/Stream input.
- [#220](https://github.com/lovell/sharp/issues/220)
- [@mikemorris](https://github.com/mikemorris)
-
-* Switch from libvips' C to C++ bindings, requires upgrade to v8.2.2.
- [#299](https://github.com/lovell/sharp/issues/299)
-
-* Control number of open files in libvips' cache; breaks existing `cache` behaviour.
- [#315](https://github.com/lovell/sharp/issues/315)
- [@impomezia](https://github.com/impomezia)
-
-* Ensure 16-bit input images can be normalised and embedded onto transparent backgrounds.
- [#339](https://github.com/lovell/sharp/issues/339)
- [#340](https://github.com/lovell/sharp/issues/340)
- [@janaz](https://github.com/janaz)
-
-* Ensure selected format takes precedence over any unknown output filename extension.
- [#344](https://github.com/lovell/sharp/issues/344)
- [@ubaltaci](https://github.com/ubaltaci)
-
-* Add support for libvips' PBM, PGM, PPM and FITS image format loaders.
- [#347](https://github.com/lovell/sharp/issues/347)
- [@oaleynik](https://github.com/oaleynik)
-
-* Ensure default crop gravity is center/centre.
- [#351](https://github.com/lovell/sharp/pull/351)
- [@joelmukuthu](https://github.com/joelmukuthu)
-
-* Improve support for musl libc systems e.g. Alpine Linux.
- [#354](https://github.com/lovell/sharp/issues/354)
- [#359](https://github.com/lovell/sharp/pull/359)
- [@download13](https://github.com/download13)
- [@wjordan](https://github.com/wjordan)
-
-* Small optimisation when reducing by an integral factor to favour shrink over affine.
-
-* Add support for gamma correction of images with an alpha channel.
-
-## v0.12 - "*look*"
-
-Requires libvips v8.2.0
-
-### v0.12.2 - 16th January 2016
-
-* Upgrade libvips to v8.2.0 for improved vips_shrink.
-
-* Add pre-compiled libvips for ARMv6+ CPUs.
-
-* Ensure 16-bit input images work with embed option.
- [#325](https://github.com/lovell/sharp/issues/325)
- [@janaz](https://github.com/janaz)
-
-* Allow compilation with gmake to provide FreeBSD support.
- [#326](https://github.com/lovell/sharp/issues/326)
- [@c0decafe](https://github.com/c0decafe)
-
-* Attempt to remove temporary file after installation.
- [#331](https://github.com/lovell/sharp/issues/331)
- [@dtoubelis](https://github.com/dtoubelis)
-
-### v0.12.1 - 12th December 2015
-
-* Allow use of SIMD vector instructions (via liborc) to be toggled on/off.
- [#172](https://github.com/lovell/sharp/issues/172)
- [@bkw](https://github.com/bkw)
- [@puzrin](https://github.com/puzrin)
-
-* Ensure embedded ICC profiles output with perceptual intent.
- [#321](https://github.com/lovell/sharp/issues/321)
- [@vlapo](https://github.com/vlapo)
-
-* Use the NPM-configured HTTPS proxy, if any, for binary downloads.
-
-### v0.12.0 - 23rd November 2015
-
-* Bundle pre-compiled libvips and its dependencies for 64-bit Linux and Windows.
- [#42](https://github.com/lovell/sharp/issues/42)
-
-* Take advantage of libvips v8.1.0+ features.
- [#152](https://github.com/lovell/sharp/issues/152)
-
-* Add support for 64-bit Windows. Drop support for 32-bit Windows.
- [#224](https://github.com/lovell/sharp/issues/224)
- [@sabrehagen](https://github.com/sabrehagen)
-
-* Switch default interpolator to bicubic.
- [#289](https://github.com/lovell/sharp/issues/289)
- [@mahnunchik](https://github.com/mahnunchik)
-
-* Pre-extract rotatation should not swap width/height.
- [#296](https://github.com/lovell/sharp/issues/296)
- [@asilvas](https://github.com/asilvas)
-
-* Ensure 16-bit+alpha input images are (un)premultiplied correctly.
- [#301](https://github.com/lovell/sharp/issues/301)
- [@izaakschroeder](https://github.com/izaakschroeder)
-
-* Add `threshold` operation.
- [#303](https://github.com/lovell/sharp/pull/303)
- [@dacarley](https://github.com/dacarley)
-
-* Add `negate` operation.
- [#306](https://github.com/lovell/sharp/pull/306)
- [@dacarley](https://github.com/dacarley)
-
-* Support `options` Object with existing `extract` operation.
- [#309](https://github.com/lovell/sharp/pull/309)
- [@papandreou](https://github.com/papandreou)
-
-## v0.11 - "*knife*"
-
-### v0.11.4 - 5th November 2015
-
-* Add corners, e.g. `northeast`, to existing `gravity` option.
- [#291](https://github.com/lovell/sharp/pull/291)
- [@brandonaaron](https://github.com/brandonaaron)
-
-* Ensure correct auto-rotation for EXIF Orientation values 2 and 4.
- [#288](https://github.com/lovell/sharp/pull/288)
- [@brandonaaron](https://github.com/brandonaaron)
-
-* Make static linking possible via `--runtime_link` install option.
- [#287](https://github.com/lovell/sharp/pull/287)
- [@vlapo](https://github.com/vlapo)
-
-### v0.11.3 - 8th September 2015
-
-* Intrepret blurSigma, sharpenFlat, and sharpenJagged as double precision.
- [#263](https://github.com/lovell/sharp/pull/263)
- [@chrisriley](https://github.com/chrisriley)
-
-### v0.11.2 - 28th August 2015
-
-* Allow crop gravity to be provided as a String.
- [#255](https://github.com/lovell/sharp/pull/255)
- [@papandreou](https://github.com/papandreou)
-* Add support for io.js v3 and Node v4.
- [#246](https://github.com/lovell/sharp/issues/246)
-
-### v0.11.1 - 12th August 2015
-
-* Silence MSVC warning: "C4530: C++ exception handler used, but unwind semantics are not enabled".
- [#244](https://github.com/lovell/sharp/pull/244)
- [@TheThing](https://github.com/TheThing)
-
-* Suppress gamma correction for input image with alpha transparency.
- [#249](https://github.com/lovell/sharp/issues/249)
- [@compeak](https://github.com/compeak)
-
-### v0.11.0 - 15th July 2015
-
-* Allow alpha transparency compositing via new `overlayWith` method.
- [#97](https://github.com/lovell/sharp/issues/97)
- [@gasi](https://github.com/gasi)
-
-* Expose raw ICC profile data as a Buffer when using `metadata`.
- [#129](https://github.com/lovell/sharp/issues/129)
- [@homerjam](https://github.com/homerjam)
-
-* Allow image header updates via a parameter passed to existing `withMetadata` method.
- Provide initial support for EXIF `Orientation` tag,
- which if present is now removed when using `rotate`, `flip` or `flop`.
- [#189](https://github.com/lovell/sharp/issues/189)
- [@h2non](https://github.com/h2non)
-
-* Tighten constructor parameter checks.
- [#221](https://github.com/lovell/sharp/issues/221)
- [@mikemorris](https://github.com/mikemorris)
-
-* Allow one input Stream to be shared with two or more output Streams via new `clone` method.
- [#235](https://github.com/lovell/sharp/issues/235)
- [@jaubourg](https://github.com/jaubourg)
-
-* Use `round` instead of `floor` when auto-scaling dimensions to avoid floating-point rounding errors.
- [#238](https://github.com/lovell/sharp/issues/238)
- [@richardadjogah](https://github.com/richardadjogah)
-
-## v0.10 - "*judgment*"
-
-### v0.10.1 - 1st June 2015
-
-* Allow embed of image with alpha transparency onto non-transparent background.
- [#204](https://github.com/lovell/sharp/issues/204)
- [@mikemliu](https://github.com/mikemliu)
-
-* Include C standard library for `atoi` as Xcode 6.3 appears to no longer do this.
- [#228](https://github.com/lovell/sharp/issues/228)
- [@doggan](https://github.com/doggan)
-
-### v0.10.0 - 23rd April 2015
-
-* Add support for Windows (x86).
- [#19](https://github.com/lovell/sharp/issues/19)
- [@DullReferenceException](https://github.com/DullReferenceException)
- [@itsananderson](https://github.com/itsananderson)
-
-* Add support for Openslide input and DeepZoom output.
- [#146](https://github.com/lovell/sharp/issues/146)
- [@mvictoras](https://github.com/mvictoras)
-
-* Allow arbitrary aspect ratios when resizing images via new `ignoreAspectRatio` method.
- [#192](https://github.com/lovell/sharp/issues/192)
- [@skedastik](https://github.com/skedastik)
-
-* Enhance output image contrast by stretching its luminance to cover the full dynamic range via new `normalize` method.
- [#194](https://github.com/lovell/sharp/issues/194)
- [@bkw](https://github.com/bkw)
- [@codingforce](https://github.com/codingforce)
diff --git a/docs/src/content/docs/changelog/_meta.yml b/docs/src/content/docs/changelog/_meta.yml
new file mode 100644
index 000000000..5dd257241
--- /dev/null
+++ b/docs/src/content/docs/changelog/_meta.yml
@@ -0,0 +1 @@
+sort: reverse-slug
diff --git a/docs/src/content/docs/changelog/v0.10.0.md b/docs/src/content/docs/changelog/v0.10.0.md
new file mode 100644
index 000000000..aae2ca0ee
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.10.0.md
@@ -0,0 +1,22 @@
+---
+title: v0.10.0 - 23rd April 2015
+slug: changelog/v0.10.0
+---
+
+* Add support for Windows (x86).
+ [#19](https://github.com/lovell/sharp/issues/19)
+ [@DullReferenceException](https://github.com/DullReferenceException)
+ [@itsananderson](https://github.com/itsananderson)
+
+* Add support for Openslide input and DeepZoom output.
+ [#146](https://github.com/lovell/sharp/issues/146)
+ [@mvictoras](https://github.com/mvictoras)
+
+* Allow arbitrary aspect ratios when resizing images via new `ignoreAspectRatio` method.
+ [#192](https://github.com/lovell/sharp/issues/192)
+ [@skedastik](https://github.com/skedastik)
+
+* Enhance output image contrast by stretching its luminance to cover the full dynamic range via new `normalize` method.
+ [#194](https://github.com/lovell/sharp/issues/194)
+ [@bkw](https://github.com/bkw)
+ [@codingforce](https://github.com/codingforce)
diff --git a/docs/src/content/docs/changelog/v0.10.1.md b/docs/src/content/docs/changelog/v0.10.1.md
new file mode 100644
index 000000000..6f0336861
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.10.1.md
@@ -0,0 +1,12 @@
+---
+title: v0.10.1 - 1st June 2015
+slug: changelog/v0.10.1
+---
+
+* Allow embed of image with alpha transparency onto non-transparent background.
+ [#204](https://github.com/lovell/sharp/issues/204)
+ [@mikemliu](https://github.com/mikemliu)
+
+* Include C standard library for `atoi` as Xcode 6.3 appears to no longer do this.
+ [#228](https://github.com/lovell/sharp/issues/228)
+ [@doggan](https://github.com/doggan)
diff --git a/docs/src/content/docs/changelog/v0.11.0.md b/docs/src/content/docs/changelog/v0.11.0.md
new file mode 100644
index 000000000..2b07a93a5
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.11.0.md
@@ -0,0 +1,30 @@
+---
+title: v0.11.0 - 15th July 2015
+slug: changelog/v0.11.0
+---
+
+* Allow alpha transparency compositing via new `overlayWith` method.
+ [#97](https://github.com/lovell/sharp/issues/97)
+ [@gasi](https://github.com/gasi)
+
+* Expose raw ICC profile data as a Buffer when using `metadata`.
+ [#129](https://github.com/lovell/sharp/issues/129)
+ [@homerjam](https://github.com/homerjam)
+
+* Allow image header updates via a parameter passed to existing `withMetadata` method.
+ Provide initial support for EXIF `Orientation` tag,
+ which if present is now removed when using `rotate`, `flip` or `flop`.
+ [#189](https://github.com/lovell/sharp/issues/189)
+ [@h2non](https://github.com/h2non)
+
+* Tighten constructor parameter checks.
+ [#221](https://github.com/lovell/sharp/issues/221)
+ [@mikemorris](https://github.com/mikemorris)
+
+* Allow one input Stream to be shared with two or more output Streams via new `clone` method.
+ [#235](https://github.com/lovell/sharp/issues/235)
+ [@jaubourg](https://github.com/jaubourg)
+
+* Use `round` instead of `floor` when auto-scaling dimensions to avoid floating-point rounding errors.
+ [#238](https://github.com/lovell/sharp/issues/238)
+ [@richardadjogah](https://github.com/richardadjogah)
diff --git a/docs/src/content/docs/changelog/v0.11.1.md b/docs/src/content/docs/changelog/v0.11.1.md
new file mode 100644
index 000000000..44bdfc925
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.11.1.md
@@ -0,0 +1,12 @@
+---
+title: v0.11.1 - 12th August 2015
+slug: changelog/v0.11.1
+---
+
+* Silence MSVC warning: "C4530: C++ exception handler used, but unwind semantics are not enabled".
+ [#244](https://github.com/lovell/sharp/pull/244)
+ [@TheThing](https://github.com/TheThing)
+
+* Suppress gamma correction for input image with alpha transparency.
+ [#249](https://github.com/lovell/sharp/issues/249)
+ [@compeak](https://github.com/compeak)
diff --git a/docs/src/content/docs/changelog/v0.11.2.md b/docs/src/content/docs/changelog/v0.11.2.md
new file mode 100644
index 000000000..9990b05f7
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.11.2.md
@@ -0,0 +1,10 @@
+---
+title: v0.11.2 - 28th August 2015
+slug: changelog/v0.11.2
+---
+
+* Allow crop gravity to be provided as a String.
+ [#255](https://github.com/lovell/sharp/pull/255)
+ [@papandreou](https://github.com/papandreou)
+* Add support for io.js v3 and Node v4.
+ [#246](https://github.com/lovell/sharp/issues/246)
diff --git a/docs/src/content/docs/changelog/v0.11.3.md b/docs/src/content/docs/changelog/v0.11.3.md
new file mode 100644
index 000000000..a062d1b8b
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.11.3.md
@@ -0,0 +1,8 @@
+---
+title: v0.11.3 - 8th September 2015
+slug: changelog/v0.11.3
+---
+
+* Intrepret blurSigma, sharpenFlat, and sharpenJagged as double precision.
+ [#263](https://github.com/lovell/sharp/pull/263)
+ [@chrisriley](https://github.com/chrisriley)
diff --git a/docs/src/content/docs/changelog/v0.11.4.md b/docs/src/content/docs/changelog/v0.11.4.md
new file mode 100644
index 000000000..f8cba2cd6
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.11.4.md
@@ -0,0 +1,16 @@
+---
+title: v0.11.4 - 5th November 2015
+slug: changelog/v0.11.4
+---
+
+* Add corners, e.g. `northeast`, to existing `gravity` option.
+ [#291](https://github.com/lovell/sharp/pull/291)
+ [@brandonaaron](https://github.com/brandonaaron)
+
+* Ensure correct auto-rotation for EXIF Orientation values 2 and 4.
+ [#288](https://github.com/lovell/sharp/pull/288)
+ [@brandonaaron](https://github.com/brandonaaron)
+
+* Make static linking possible via `--runtime_link` install option.
+ [#287](https://github.com/lovell/sharp/pull/287)
+ [@vlapo](https://github.com/vlapo)
diff --git a/docs/src/content/docs/changelog/v0.12.0.md b/docs/src/content/docs/changelog/v0.12.0.md
new file mode 100644
index 000000000..c081be9de
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.12.0.md
@@ -0,0 +1,38 @@
+---
+title: v0.12.0 - 23rd November 2015
+slug: changelog/v0.12.0
+---
+
+* Bundle pre-compiled libvips and its dependencies for 64-bit Linux and Windows.
+ [#42](https://github.com/lovell/sharp/issues/42)
+
+* Take advantage of libvips v8.1.0+ features.
+ [#152](https://github.com/lovell/sharp/issues/152)
+
+* Add support for 64-bit Windows. Drop support for 32-bit Windows.
+ [#224](https://github.com/lovell/sharp/issues/224)
+ [@sabrehagen](https://github.com/sabrehagen)
+
+* Switch default interpolator to bicubic.
+ [#289](https://github.com/lovell/sharp/issues/289)
+ [@mahnunchik](https://github.com/mahnunchik)
+
+* Pre-extract rotatation should not swap width/height.
+ [#296](https://github.com/lovell/sharp/issues/296)
+ [@asilvas](https://github.com/asilvas)
+
+* Ensure 16-bit+alpha input images are (un)premultiplied correctly.
+ [#301](https://github.com/lovell/sharp/issues/301)
+ [@izaakschroeder](https://github.com/izaakschroeder)
+
+* Add `threshold` operation.
+ [#303](https://github.com/lovell/sharp/pull/303)
+ [@dacarley](https://github.com/dacarley)
+
+* Add `negate` operation.
+ [#306](https://github.com/lovell/sharp/pull/306)
+ [@dacarley](https://github.com/dacarley)
+
+* Support `options` Object with existing `extract` operation.
+ [#309](https://github.com/lovell/sharp/pull/309)
+ [@papandreou](https://github.com/papandreou)
diff --git a/docs/src/content/docs/changelog/v0.12.1.md b/docs/src/content/docs/changelog/v0.12.1.md
new file mode 100644
index 000000000..61fb46a80
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.12.1.md
@@ -0,0 +1,15 @@
+---
+title: v0.12.1 - 12th December 2015
+slug: changelog/v0.12.1
+---
+
+* Allow use of SIMD vector instructions (via liborc) to be toggled on/off.
+ [#172](https://github.com/lovell/sharp/issues/172)
+ [@bkw](https://github.com/bkw)
+ [@puzrin](https://github.com/puzrin)
+
+* Ensure embedded ICC profiles output with perceptual intent.
+ [#321](https://github.com/lovell/sharp/issues/321)
+ [@vlapo](https://github.com/vlapo)
+
+* Use the NPM-configured HTTPS proxy, if any, for binary downloads.
diff --git a/docs/src/content/docs/changelog/v0.12.2.md b/docs/src/content/docs/changelog/v0.12.2.md
new file mode 100644
index 000000000..91dd927de
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.12.2.md
@@ -0,0 +1,20 @@
+---
+title: v0.12.2 - 16th January 2016
+slug: changelog/v0.12.2
+---
+
+* Upgrade libvips to v8.2.0 for improved vips_shrink.
+
+* Add pre-compiled libvips for ARMv6+ CPUs.
+
+* Ensure 16-bit input images work with embed option.
+ [#325](https://github.com/lovell/sharp/issues/325)
+ [@janaz](https://github.com/janaz)
+
+* Allow compilation with gmake to provide FreeBSD support.
+ [#326](https://github.com/lovell/sharp/issues/326)
+ [@c0decafe](https://github.com/c0decafe)
+
+* Attempt to remove temporary file after installation.
+ [#331](https://github.com/lovell/sharp/issues/331)
+ [@dtoubelis](https://github.com/dtoubelis)
diff --git a/docs/src/content/docs/changelog/v0.13.0.md b/docs/src/content/docs/changelog/v0.13.0.md
new file mode 100644
index 000000000..f1c989a6b
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.13.0.md
@@ -0,0 +1,47 @@
+---
+title: v0.13.0 - 15th February 2016
+slug: changelog/v0.13.0
+---
+
+* Improve vector image support by allowing control of density/DPI.
+ Switch pre-built libs from Imagemagick to Graphicsmagick.
+ [#110](https://github.com/lovell/sharp/issues/110)
+ [@bradisbell](https://github.com/bradisbell)
+
+* Add support for raw, uncompressed pixel Buffer/Stream input.
+ [#220](https://github.com/lovell/sharp/issues/220)
+ [@mikemorris](https://github.com/mikemorris)
+
+* Switch from libvips' C to C++ bindings, requires upgrade to v8.2.2.
+ [#299](https://github.com/lovell/sharp/issues/299)
+
+* Control number of open files in libvips' cache; breaks existing `cache` behaviour.
+ [#315](https://github.com/lovell/sharp/issues/315)
+ [@impomezia](https://github.com/impomezia)
+
+* Ensure 16-bit input images can be normalised and embedded onto transparent backgrounds.
+ [#339](https://github.com/lovell/sharp/issues/339)
+ [#340](https://github.com/lovell/sharp/issues/340)
+ [@janaz](https://github.com/janaz)
+
+* Ensure selected format takes precedence over any unknown output filename extension.
+ [#344](https://github.com/lovell/sharp/issues/344)
+ [@ubaltaci](https://github.com/ubaltaci)
+
+* Add support for libvips' PBM, PGM, PPM and FITS image format loaders.
+ [#347](https://github.com/lovell/sharp/issues/347)
+ [@oaleynik](https://github.com/oaleynik)
+
+* Ensure default crop gravity is center/centre.
+ [#351](https://github.com/lovell/sharp/pull/351)
+ [@joelmukuthu](https://github.com/joelmukuthu)
+
+* Improve support for musl libc systems e.g. Alpine Linux.
+ [#354](https://github.com/lovell/sharp/issues/354)
+ [#359](https://github.com/lovell/sharp/pull/359)
+ [@download13](https://github.com/download13)
+ [@wjordan](https://github.com/wjordan)
+
+* Small optimisation when reducing by an integral factor to favour shrink over affine.
+
+* Add support for gamma correction of images with an alpha channel.
diff --git a/docs/src/content/docs/changelog/v0.13.1.md b/docs/src/content/docs/changelog/v0.13.1.md
new file mode 100644
index 000000000..cbaf11ec5
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.13.1.md
@@ -0,0 +1,8 @@
+---
+title: v0.13.1 - 27th February 2016
+slug: changelog/v0.13.1
+---
+
+* Fix embedding onto transparent backgrounds; regression introduced in v0.13.0.
+ [#366](https://github.com/lovell/sharp/issues/366)
+ [@diegocsandrim](https://github.com/diegocsandrim)
diff --git a/docs/src/content/docs/changelog/v0.14.0.md b/docs/src/content/docs/changelog/v0.14.0.md
new file mode 100644
index 000000000..a23f2e7f0
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.14.0.md
@@ -0,0 +1,39 @@
+---
+title: v0.14.0 - 2nd April 2016
+slug: changelog/v0.14.0
+---
+
+* Add ability to extend (pad) the edges of an image.
+ [#128](https://github.com/lovell/sharp/issues/128)
+ [@blowsie](https://github.com/blowsie)
+
+* Add support for Zoomify and Google tile layouts. Breaks existing tile API.
+ [#223](https://github.com/lovell/sharp/issues/223)
+ [@bdunnette](https://github.com/bdunnette)
+
+* Improvements to overlayWith: differing sizes/formats, gravity, buffer input.
+ [#239](https://github.com/lovell/sharp/issues/239)
+ [@chrisriley](https://github.com/chrisriley)
+
+* Add entropy-based crop strategy to remove least interesting edges.
+ [#295](https://github.com/lovell/sharp/issues/295)
+ [@rightaway](https://github.com/rightaway)
+
+* Expose density metadata; set density of images from vector input.
+ [#338](https://github.com/lovell/sharp/issues/338)
+ [@lookfirst](https://github.com/lookfirst)
+
+* Emit post-processing 'info' event for Stream output.
+ [#367](https://github.com/lovell/sharp/issues/367)
+ [@salzhrani](https://github.com/salzhrani)
+
+* Ensure output image EXIF Orientation values are within 1-8 range.
+ [#385](https://github.com/lovell/sharp/pull/385)
+ [@jtobinisaniceguy](https://github.com/jtobinisaniceguy)
+
+* Ensure ratios are not swapped when rotating 90/270 and ignoring aspect.
+ [#387](https://github.com/lovell/sharp/issues/387)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Remove deprecated style of calling extract API. Breaks calls using positional arguments.
+ [#276](https://github.com/lovell/sharp/issues/276)
diff --git a/docs/src/content/docs/changelog/v0.14.1.md b/docs/src/content/docs/changelog/v0.14.1.md
new file mode 100644
index 000000000..85e88c8b1
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.14.1.md
@@ -0,0 +1,26 @@
+---
+title: v0.14.1 - 16th April 2016
+slug: changelog/v0.14.1
+---
+
+* Allow removal of limitation on input pixel count via limitInputPixels. Use with care.
+ [#250](https://github.com/lovell/sharp/issues/250)
+ [#316](https://github.com/lovell/sharp/pull/316)
+ [@anandthakker](https://github.com/anandthakker)
+ [@kentongray](https://github.com/kentongray)
+
+* Use final output image for metadata passed to callback.
+ [#399](https://github.com/lovell/sharp/pull/399)
+ [@salzhrani](https://github.com/salzhrani)
+
+* Add support for writing tiled images to a zip container.
+ [#402](https://github.com/lovell/sharp/pull/402)
+ [@felixbuenemann](https://github.com/felixbuenemann)
+
+* Allow use of embed with 1 and 2 channel images.
+ [#411](https://github.com/lovell/sharp/issues/411)
+ [@janaz](https://github.com/janaz)
+
+* Improve Electron compatibility by allowing node-gyp rebuilds without npm.
+ [#412](https://github.com/lovell/sharp/issues/412)
+ [@nouh](https://github.com/nouh)
diff --git a/docs/src/content/docs/changelog/v0.15.0.md b/docs/src/content/docs/changelog/v0.15.0.md
new file mode 100644
index 000000000..ed7807f98
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.15.0.md
@@ -0,0 +1,20 @@
+---
+title: v0.15.0 - 21st May 2016
+slug: changelog/v0.15.0
+---
+
+* Use libvips' new Lanczos 3 kernel as default for image reduction.
+ Deprecate interpolateWith method, now provided as a resize option.
+ [#310](https://github.com/lovell/sharp/issues/310)
+ [@jcupitt](https://github.com/jcupitt)
+
+* Take advantage of libvips v8.3 features.
+ Add support for libvips' new GIF and SVG loaders.
+ Pre-built binaries now include giflib and librsvg, exclude *magick.
+ Use shrink-on-load for WebP input.
+ Break existing sharpen API to accept sigma and improve precision.
+ [#369](https://github.com/lovell/sharp/issues/369)
+
+* Remove unnecessary (un)premultiply operations when not resizing/compositing.
+ [#413](https://github.com/lovell/sharp/issues/413)
+ [@jardakotesovec](https://github.com/jardakotesovec)
diff --git a/docs/src/content/docs/changelog/v0.15.1.md b/docs/src/content/docs/changelog/v0.15.1.md
new file mode 100644
index 000000000..4cfdfba7d
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.15.1.md
@@ -0,0 +1,68 @@
+---
+title: v0.15.1 - 12th July 2016
+slug: changelog/v0.15.1
+---
+
+* Concat Stream-based input in single operation for ~+3% perf and less GC.
+ [#429](https://github.com/lovell/sharp/issues/429)
+ [@papandreou](https://github.com/papandreou)
+
+* Add alpha channel, if required, before extend operation.
+ [#439](https://github.com/lovell/sharp/pull/439)
+ [@frulo](https://github.com/frulo)
+
+* Allow overlay image to be repeated across entire image via tile option.
+ [#443](https://github.com/lovell/sharp/pull/443)
+ [@lemnisk8](https://github.com/lemnisk8)
+
+* Add cutout option to overlayWith feature, applies only the alpha channel of the overlay image.
+ [#448](https://github.com/lovell/sharp/pull/448)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Ensure scaling factors are calculated independently to prevent rounding errors.
+ [#452](https://github.com/lovell/sharp/issues/452)
+ [@puzrin](https://github.com/puzrin)
+
+* Add --sharp-cxx11 flag to compile with gcc's new C++11 ABI.
+ [#456](https://github.com/lovell/sharp/pull/456)
+ [@kapouer](https://github.com/kapouer)
+
+* Add top/left offset support to overlayWith operation.
+ [#473](https://github.com/lovell/sharp/pull/473)
+ [@rnanwani](https://github.com/rnanwani)
+
+* Add convolve operation for kernel-based convolution.
+ [#479](https://github.com/lovell/sharp/pull/479)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add greyscale option to threshold operation for colourspace conversion control.
+ [#480](https://github.com/lovell/sharp/pull/480)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Ensure ICC profiles are licenced for distribution.
+ [#486](https://github.com/lovell/sharp/issues/486)
+ [@kapouer](https://github.com/kapouer)
+
+* Allow images with an alpha channel to work with LAB-colourspace based sharpen.
+ [#490](https://github.com/lovell/sharp/issues/490)
+ [@jwagner](https://github.com/jwagner)
+
+* Add trim operation to remove "boring" edges.
+ [#492](https://github.com/lovell/sharp/pull/492)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Add bandbool feature for channel-wise boolean operations.
+ [#496](https://github.com/lovell/sharp/pull/496)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add extractChannel operation to extract a channel from an image.
+ [#497](https://github.com/lovell/sharp/pull/497)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add ability to read and write native libvips .v files.
+ [#500](https://github.com/lovell/sharp/pull/500)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add boolean feature for bitwise image operations.
+ [#501](https://github.com/lovell/sharp/pull/501)
+ [@mhirsch](https://github.com/mhirsch)
diff --git a/docs/src/content/docs/changelog/v0.16.0.md b/docs/src/content/docs/changelog/v0.16.0.md
new file mode 100644
index 000000000..b6af330fd
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.16.0.md
@@ -0,0 +1,42 @@
+---
+title: v0.16.0 - 18th August 2016
+slug: changelog/v0.16.0
+---
+
+* Add pre-compiled libvips for OS X, ARMv7 and ARMv8.
+ [#312](https://github.com/lovell/sharp/issues/312)
+
+* Ensure boolean, bandbool, extractChannel ops occur before sRGB conversion.
+ [#504](https://github.com/lovell/sharp/pull/504)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Recalculate factors after WebP shrink-on-load to avoid round-to-zero errors.
+ [#508](https://github.com/lovell/sharp/issues/508)
+ [@asilvas](https://github.com/asilvas)
+
+* Prevent boolean errors during extract operation.
+ [#511](https://github.com/lovell/sharp/pull/511)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add joinChannel and toColourspace/toColorspace operations.
+ [#513](https://github.com/lovell/sharp/pull/513)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Add support for raw pixel data with boolean and withOverlay operations.
+ [#516](https://github.com/lovell/sharp/pull/516)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Prevent bandbool creating a single channel sRGB image.
+ [#519](https://github.com/lovell/sharp/pull/519)
+ [@mhirsch](https://github.com/mhirsch)
+
+* Ensure ICC profiles are removed from PNG output unless withMetadata used.
+ [#521](https://github.com/lovell/sharp/issues/521)
+ [@ChrisPinewood](https://github.com/ChrisPinewood)
+
+* Add alpha channels, if missing, to overlayWith images.
+ [#540](https://github.com/lovell/sharp/pull/540)
+ [@cmtt](https://github.com/cmtt)
+
+* Remove deprecated interpolateWith method - use resize(w, h, { interpolator: ... })
+ [#310](https://github.com/lovell/sharp/issues/310)
diff --git a/docs/src/content/docs/changelog/v0.16.1.md b/docs/src/content/docs/changelog/v0.16.1.md
new file mode 100644
index 000000000..c49d28981
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.16.1.md
@@ -0,0 +1,21 @@
+---
+title: v0.16.1 - 13th October 2016
+slug: changelog/v0.16.1
+---
+
+* C++11 ABI version is now auto-detected, remove sharp-cxx11 installation flag.
+
+* Add experimental 'attention' crop strategy.
+ [#295](https://github.com/lovell/sharp/issues/295)
+
+* Include .node extension for Meteor's require() implementation.
+ [#537](https://github.com/lovell/sharp/issues/537)
+ [@isjackwild](https://github.com/isjackwild)
+
+* Ensure convolution kernel scale is clamped to a minimum value of 1.
+ [#561](https://github.com/lovell/sharp/issues/561)
+ [@abagshaw](https://github.com/abagshaw)
+
+* Correct calculation of y-axis placement when overlaying image at a fixed point.
+ [#566](https://github.com/lovell/sharp/issues/566)
+ [@Nateowami](https://github.com/Nateowami)
diff --git a/docs/src/content/docs/changelog/v0.16.2.md b/docs/src/content/docs/changelog/v0.16.2.md
new file mode 100644
index 000000000..8c3976c64
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.16.2.md
@@ -0,0 +1,8 @@
+---
+title: v0.16.2 - 22nd October 2016
+slug: changelog/v0.16.2
+---
+
+* Restrict readelf usage to Linux only when detecting global libvips version.
+ [#602](https://github.com/lovell/sharp/issues/602)
+ [@caoko](https://github.com/caoko)
diff --git a/docs/src/content/docs/changelog/v0.17.0.md b/docs/src/content/docs/changelog/v0.17.0.md
new file mode 100644
index 000000000..4ec1f1856
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.17.0.md
@@ -0,0 +1,39 @@
+---
+title: v0.17.0 - 11th December 2016
+slug: changelog/v0.17.0
+---
+
+* Drop support for versions of Node prior to v4.
+
+* Deprecate the following output format "option" functions:
+ quality, progressive, compressionLevel, withoutAdaptiveFiltering,
+ withoutChromaSubsampling, trellisQuantisation, trellisQuantization,
+ overshootDeringing, optimiseScans and optimizeScans.
+ Access to these is now via output format functions, for example `quality(n)`
+ is now `jpeg({quality: n})` and/or `webp({quality: n})`.
+
+* Autoconvert GIF and SVG input to PNG output if no other format is specified.
+
+* Expose libvips' "centre" resize option to mimic \*magick's +0.5px convention.
+ [#568](https://github.com/lovell/sharp/issues/568)
+
+* Ensure support for embedded base64 PNG and JPEG images within an SVG.
+ [#601](https://github.com/lovell/sharp/issues/601)
+ [@dynamite-ready](https://github.com/dynamite-ready)
+
+* Ensure premultiply operation occurs before box filter shrink.
+ [#605](https://github.com/lovell/sharp/issues/605)
+ [@CmdrShepardsPie](https://github.com/CmdrShepardsPie)
+ [@teroparvinen](https://github.com/teroparvinen)
+
+* Add support for PNG and WebP tile-based output formats (in addition to JPEG).
+ [#622](https://github.com/lovell/sharp/pull/622)
+ [@ppaskaris](https://github.com/ppaskaris)
+
+* Allow use of extend with greyscale input.
+ [#623](https://github.com/lovell/sharp/pull/623)
+ [@ppaskaris](https://github.com/ppaskaris)
+
+* Allow non-RGB input to embed/extend onto background with an alpha channel.
+ [#646](https://github.com/lovell/sharp/issues/646)
+ [@DaGaMs](https://github.com/DaGaMs)
diff --git a/docs/src/content/docs/changelog/v0.17.1.md b/docs/src/content/docs/changelog/v0.17.1.md
new file mode 100644
index 000000000..28cf12167
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.17.1.md
@@ -0,0 +1,15 @@
+---
+title: v0.17.1 - 15th January 2017
+slug: changelog/v0.17.1
+---
+
+* Improve error messages for invalid parameters.
+ [@spikeon](https://github.com/spikeon)
+ [#644](https://github.com/lovell/sharp/pull/644)
+
+* Simplify expression for finding vips-cpp libdir.
+ [#656](https://github.com/lovell/sharp/pull/656)
+
+* Allow HTTPS-over-HTTP proxy when downloading pre-compiled dependencies.
+ [@wangzhiwei1888](https://github.com/wangzhiwei1888)
+ [#679](https://github.com/lovell/sharp/issues/679)
diff --git a/docs/src/content/docs/changelog/v0.17.2.md b/docs/src/content/docs/changelog/v0.17.2.md
new file mode 100644
index 000000000..02859307e
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.17.2.md
@@ -0,0 +1,12 @@
+---
+title: v0.17.2 - 11th February 2017
+slug: changelog/v0.17.2
+---
+
+* Ensure Readable side of Stream can start flowing after Writable side has finished.
+ [#671](https://github.com/lovell/sharp/issues/671)
+ [@danhaller](https://github.com/danhaller)
+
+* Expose WebP alpha quality, lossless and near-lossless output options.
+ [#685](https://github.com/lovell/sharp/pull/685)
+ [@rnanwani](https://github.com/rnanwani)
diff --git a/docs/src/content/docs/changelog/v0.17.3.md b/docs/src/content/docs/changelog/v0.17.3.md
new file mode 100644
index 000000000..0bc48d942
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.17.3.md
@@ -0,0 +1,20 @@
+---
+title: v0.17.3 - 1st April 2017
+slug: changelog/v0.17.3
+---
+
+* Allow toBuffer to optionally resolve a Promise with both info and data.
+ [#143](https://github.com/lovell/sharp/issues/143)
+ [@salzhrani](https://github.com/salzhrani)
+
+* Create blank image of given width, height, channels and background.
+ [#470](https://github.com/lovell/sharp/issues/470)
+ [@pjarts](https://github.com/pjarts)
+
+* Add support for the "nearest" kernel for image reductions.
+ [#732](https://github.com/lovell/sharp/pull/732)
+ [@alice0meta](https://github.com/alice0meta)
+
+* Add support for TIFF compression and predictor options.
+ [#738](https://github.com/lovell/sharp/pull/738)
+ [@kristojorg](https://github.com/kristojorg)
diff --git a/docs/src/content/docs/changelog/v0.18.0.md b/docs/src/content/docs/changelog/v0.18.0.md
new file mode 100644
index 000000000..d8afbdd04
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.18.0.md
@@ -0,0 +1,60 @@
+---
+title: v0.18.0 - 30th May 2017
+slug: changelog/v0.18.0
+---
+
+* Remove the previously-deprecated output format "option" functions:
+ quality, progressive, compressionLevel, withoutAdaptiveFiltering,
+ withoutChromaSubsampling, trellisQuantisation, trellisQuantization,
+ overshootDeringing, optimiseScans and optimizeScans.
+
+* Ensure maximum output dimensions are based on the format to be used.
+ [#176](https://github.com/lovell/sharp/issues/176)
+ [@stephanebachelier](https://github.com/stephanebachelier)
+
+* Avoid costly (un)premultiply when using overlayWith without alpha channel.
+ [#573](https://github.com/lovell/sharp/issues/573)
+ [@strarsis](https://github.com/strarsis)
+
+* Include pixel depth (e.g. "uchar") when reading metadata.
+ [#577](https://github.com/lovell/sharp/issues/577)
+ [@moedusa](https://github.com/moedusa)
+
+* Add support for Buffer and Stream-based TIFF output.
+ [#587](https://github.com/lovell/sharp/issues/587)
+ [@strarsis](https://github.com/strarsis)
+
+* Expose warnings from libvips via NODE_DEBUG=sharp environment variable.
+ [#607](https://github.com/lovell/sharp/issues/607)
+ [@puzrin](https://github.com/puzrin)
+
+* Switch to the libvips implementation of "attention" and "entropy" crop strategies.
+ [#727](https://github.com/lovell/sharp/issues/727)
+
+* Improve performance and accuracy of nearest neighbour integral upsampling.
+ [#752](https://github.com/lovell/sharp/issues/752)
+ [@MrIbby](https://github.com/MrIbby)
+
+* Constructor single argument API: allow plain object, reject null/undefined.
+ [#768](https://github.com/lovell/sharp/issues/768)
+ [@kub1x](https://github.com/kub1x)
+
+* Ensure ARM64 pre-built binaries use correct C++11 ABI version.
+ [#772](https://github.com/lovell/sharp/issues/772)
+ [@ajiratech2](https://github.com/ajiratech2)
+
+* Prevent aliasing by using dynamic values for shrink(-on-load).
+ [#781](https://github.com/lovell/sharp/issues/781)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Expose libvips' "squash" parameter to enable 1-bit TIFF output.
+ [#783](https://github.com/lovell/sharp/pull/783)
+ [@YvesBos](https://github.com/YvesBos)
+
+* Add support for rotation using any multiple of +/-90 degrees.
+ [#791](https://github.com/lovell/sharp/pull/791)
+ [@ncoden](https://github.com/ncoden)
+
+* Add "jpg" alias to toFormat as shortened form of "jpeg".
+ [#814](https://github.com/lovell/sharp/pull/814)
+ [@jingsam](https://github.com/jingsam)
diff --git a/docs/src/content/docs/changelog/v0.18.1.md b/docs/src/content/docs/changelog/v0.18.1.md
new file mode 100644
index 000000000..3121a9cf3
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.18.1.md
@@ -0,0 +1,8 @@
+---
+title: v0.18.1 - 30th May 2017
+slug: changelog/v0.18.1
+---
+
+* Remove regression from #781 that could cause incorrect shrink calculation.
+ [#831](https://github.com/lovell/sharp/issues/831)
+ [@suprMax](https://github.com/suprMax)
diff --git a/docs/src/content/docs/changelog/v0.18.2.md b/docs/src/content/docs/changelog/v0.18.2.md
new file mode 100644
index 000000000..2eabf8374
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.18.2.md
@@ -0,0 +1,19 @@
+---
+title: v0.18.2 - 1st July 2017
+slug: changelog/v0.18.2
+---
+
+* Expose libvips' xres and yres properties for TIFF output.
+ [#828](https://github.com/lovell/sharp/pull/828)
+ [@YvesBos](https://github.com/YvesBos)
+
+* Ensure flip and flop operations work with auto-rotate.
+ [#837](https://github.com/lovell/sharp/issues/837)
+ [@rexxars](https://github.com/rexxars)
+
+* Allow binary download URL override via SHARP_DIST_BASE_URL env variable.
+ [#841](https://github.com/lovell/sharp/issues/841)
+
+* Add support for Solus Linux.
+ [#857](https://github.com/lovell/sharp/pull/857)
+ [@ekremkaraca](https://github.com/ekremkaraca)
diff --git a/docs/src/content/docs/changelog/v0.18.3.md b/docs/src/content/docs/changelog/v0.18.3.md
new file mode 100644
index 000000000..ea66e8112
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.18.3.md
@@ -0,0 +1,12 @@
+---
+title: v0.18.3 - 13th September 2017
+slug: changelog/v0.18.3
+---
+
+* Skip shrink-on-load when trimming.
+ [#888](https://github.com/lovell/sharp/pull/888)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Migrate from got to simple-get for basic auth support.
+ [#945](https://github.com/lovell/sharp/pull/945)
+ [@pbomb](https://github.com/pbomb)
diff --git a/docs/src/content/docs/changelog/v0.18.4.md b/docs/src/content/docs/changelog/v0.18.4.md
new file mode 100644
index 000000000..002e06c26
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.18.4.md
@@ -0,0 +1,8 @@
+---
+title: v0.18.4 - 18th September 2017
+slug: changelog/v0.18.4
+---
+
+* Ensure input Buffer really is marked as Persistent, prevents mark-sweep GC.
+ [#950](https://github.com/lovell/sharp/issues/950)
+ [@lfdoherty](https://github.com/lfdoherty)
diff --git a/docs/src/content/docs/changelog/v0.19.0.md b/docs/src/content/docs/changelog/v0.19.0.md
new file mode 100644
index 000000000..d9ecfefcb
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.19.0.md
@@ -0,0 +1,46 @@
+---
+title: v0.19.0 - 11th January 2018
+slug: changelog/v0.19.0
+---
+
+* Expose offset coordinates of strategy-based crop.
+ [#868](https://github.com/lovell/sharp/issues/868)
+ [@mirohristov-com](https://github.com/mirohristov-com)
+
+* PNG output now defaults to adaptiveFiltering=false, compressionLevel=9
+ [#872](https://github.com/lovell/sharp/issues/872)
+ [@wmertens](https://github.com/wmertens)
+
+* Add stats feature for pixel-derived image statistics.
+ [#915](https://github.com/lovell/sharp/pull/915)
+ [@rnanwani](https://github.com/rnanwani)
+
+* Add failOnError option to fail-fast on bad input image data.
+ [#976](https://github.com/lovell/sharp/pull/976)
+ [@mceachen](https://github.com/mceachen)
+
+* Resize: switch to libvips' implementation, make fastShrinkOnLoad optional, remove interpolator and centreSampling options.
+ [#977](https://github.com/lovell/sharp/pull/977)
+ [@jardakotesovec](https://github.com/jardakotesovec)
+
+* Attach finish event listener to a clone only for Stream-based input.
+ [#995](https://github.com/lovell/sharp/issues/995)
+ [@whmountains](https://github.com/whmountains)
+
+* Add tilecache before smartcrop to avoid over-computation of previous operations.
+ [#1028](https://github.com/lovell/sharp/issues/1028)
+ [@coffeebite](https://github.com/coffeebite)
+
+* Prevent toFile extension taking precedence over requested format.
+ [#1037](https://github.com/lovell/sharp/issues/1037)
+ [@tomgallagher](https://github.com/tomgallagher)
+
+* Add support for gravity option to existing embed feature.
+ [#1038](https://github.com/lovell/sharp/pull/1038)
+ [@AzureByte](https://github.com/AzureByte)
+
+* Expose IPTC and XMP metadata when available.
+ [#1079](https://github.com/lovell/sharp/pull/1079)
+ [@oaleynik](https://github.com/oaleynik)
+
+* TIFF output: switch default predictor from 'none' to 'horizontal' to match libvips' behaviour.
diff --git a/docs/src/content/docs/changelog/v0.19.1.md b/docs/src/content/docs/changelog/v0.19.1.md
new file mode 100644
index 000000000..deeea20d1
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.19.1.md
@@ -0,0 +1,16 @@
+---
+title: v0.19.1 - 24th February 2018
+slug: changelog/v0.19.1
+---
+
+* Expose libvips' linear transform feature.
+ [#1024](https://github.com/lovell/sharp/pull/1024)
+ [@3epnm](https://github.com/3epnm)
+
+* Expose angle option for tile-based output.
+ [#1121](https://github.com/lovell/sharp/pull/1121)
+ [@BiancoA](https://github.com/BiancoA)
+
+* Prevent crop operation when image already at or below target dimensions.
+ [#1134](https://github.com/lovell/sharp/issues/1134)
+ [@pieh](https://github.com/pieh)
diff --git a/docs/src/content/docs/changelog/v0.20.0.md b/docs/src/content/docs/changelog/v0.20.0.md
new file mode 100644
index 000000000..1f0bf56a2
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.0.md
@@ -0,0 +1,7 @@
+---
+title: v0.20.0 - 5th March 2018
+slug: changelog/v0.20.0
+---
+
+* Add support for prebuilt sharp binaries on common platforms.
+ [#186](https://github.com/lovell/sharp/issues/186)
diff --git a/docs/src/content/docs/changelog/v0.20.1.md b/docs/src/content/docs/changelog/v0.20.1.md
new file mode 100644
index 000000000..f4af4314c
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.1.md
@@ -0,0 +1,15 @@
+---
+title: v0.20.1 - 17th March 2018
+slug: changelog/v0.20.1
+---
+
+* Improve installation experience when a globally-installed libvips below the minimum required version is found.
+ [#1148](https://github.com/lovell/sharp/issues/1148)
+
+* Prevent smartcrop error when cumulative rounding is below target size.
+ [#1154](https://github.com/lovell/sharp/issues/1154)
+ [@ralrom](https://github.com/ralrom)
+
+* Expose libvips' median filter operation.
+ [#1161](https://github.com/lovell/sharp/pull/1161)
+ [@BiancoA](https://github.com/BiancoA)
diff --git a/docs/src/content/docs/changelog/v0.20.2.md b/docs/src/content/docs/changelog/v0.20.2.md
new file mode 100644
index 000000000..202d5c339
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.2.md
@@ -0,0 +1,20 @@
+---
+title: v0.20.2 - 28th April 2018
+slug: changelog/v0.20.2
+---
+
+* Add tint operation to set image chroma.
+ [#825](https://github.com/lovell/sharp/pull/825)
+ [@rikh42](https://github.com/rikh42)
+
+* Add environment variable to ignore globally-installed libvips.
+ [#1165](https://github.com/lovell/sharp/pull/1165)
+ [@oncletom](https://github.com/oncletom)
+
+* Add support for page selection with multi-page input (GIF/TIFF).
+ [#1204](https://github.com/lovell/sharp/pull/1204)
+ [@woolite64](https://github.com/woolite64)
+
+* Add support for Group4 (CCITTFAX4) compression with TIFF output.
+ [#1208](https://github.com/lovell/sharp/pull/1208)
+ [@woolite64](https://github.com/woolite64)
diff --git a/docs/src/content/docs/changelog/v0.20.3.md b/docs/src/content/docs/changelog/v0.20.3.md
new file mode 100644
index 000000000..b00c64910
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.3.md
@@ -0,0 +1,8 @@
+---
+title: v0.20.3 - 29th May 2018
+slug: changelog/v0.20.3
+---
+
+* Fix tint operation by ensuring LAB interpretation and allowing negative values.
+ [#1235](https://github.com/lovell/sharp/issues/1235)
+ [@wezside](https://github.com/wezside)
diff --git a/docs/src/content/docs/changelog/v0.20.4.md b/docs/src/content/docs/changelog/v0.20.4.md
new file mode 100644
index 000000000..a9580dea3
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.4.md
@@ -0,0 +1,12 @@
+---
+title: v0.20.4 - 20th June 2018
+slug: changelog/v0.20.4
+---
+
+* Prevent possible rounding error when using shrink-on-load and 90/270 degree rotation.
+ [#1241](https://github.com/lovell/sharp/issues/1241)
+ [@anahit42](https://github.com/anahit42)
+
+* Ensure extractChannel sets correct single-channel colour space interpretation.
+ [#1257](https://github.com/lovell/sharp/issues/1257)
+ [@jeremychone](https://github.com/jeremychone)
diff --git a/docs/src/content/docs/changelog/v0.20.5.md b/docs/src/content/docs/changelog/v0.20.5.md
new file mode 100644
index 000000000..07f166149
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.5.md
@@ -0,0 +1,8 @@
+---
+title: v0.20.5 - 27th June 2018
+slug: changelog/v0.20.5
+---
+
+* Expose libjpeg optimize_coding flag.
+ [#1265](https://github.com/lovell/sharp/pull/1265)
+ [@tomlokhorst](https://github.com/tomlokhorst)
diff --git a/docs/src/content/docs/changelog/v0.20.6.md b/docs/src/content/docs/changelog/v0.20.6.md
new file mode 100644
index 000000000..284a67a27
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.6.md
@@ -0,0 +1,33 @@
+---
+title: v0.20.6 - 20th August 2018
+slug: changelog/v0.20.6
+---
+
+* Add removeAlpha operation to remove alpha channel, if any.
+ [#1248](https://github.com/lovell/sharp/issues/1248)
+
+* Expose mozjpeg quant_table flag.
+ [#1285](https://github.com/lovell/sharp/pull/1285)
+ [@rexxars](https://github.com/rexxars)
+
+* Allow full WebP alphaQuality range of 0-100.
+ [#1290](https://github.com/lovell/sharp/pull/1290)
+ [@sylvaindumont](https://github.com/sylvaindumont)
+
+* Cache libvips binaries to reduce re-install time.
+ [#1301](https://github.com/lovell/sharp/issues/1301)
+
+* Ensure vendor platform mismatch throws error at install time.
+ [#1303](https://github.com/lovell/sharp/issues/1303)
+
+* Improve install time error messages for FreeBSD users.
+ [#1310](https://github.com/lovell/sharp/issues/1310)
+
+* Ensure extractChannel works with 16-bit images.
+ [#1330](https://github.com/lovell/sharp/issues/1330)
+
+* Expose depth option for tile-based output.
+ [#1342](https://github.com/lovell/sharp/pull/1342)
+ [@alundavies](https://github.com/alundavies)
+
+* Add experimental entropy field to stats response.
diff --git a/docs/src/content/docs/changelog/v0.20.7.md b/docs/src/content/docs/changelog/v0.20.7.md
new file mode 100644
index 000000000..e9503a29d
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.7.md
@@ -0,0 +1,7 @@
+---
+title: v0.20.7 - 21st August 2018
+slug: changelog/v0.20.7
+---
+
+* Use copy+unlink if rename operation fails during installation.
+ [#1345](https://github.com/lovell/sharp/issues/1345)
diff --git a/docs/src/content/docs/changelog/v0.20.8.md b/docs/src/content/docs/changelog/v0.20.8.md
new file mode 100644
index 000000000..8ab9a062a
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.20.8.md
@@ -0,0 +1,12 @@
+---
+title: v0.20.8 - 5th September 2018
+slug: changelog/v0.20.8
+---
+
+* Avoid race conditions when creating directories during installation.
+ [#1358](https://github.com/lovell/sharp/pull/1358)
+ [@ajhool](https://github.com/ajhool)
+
+* Accept floating point values for input density parameter.
+ [#1362](https://github.com/lovell/sharp/pull/1362)
+ [@aeirola](https://github.com/aeirola)
diff --git a/docs/src/content/docs/changelog/v0.21.0.md b/docs/src/content/docs/changelog/v0.21.0.md
new file mode 100644
index 000000000..762cc65a4
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.21.0.md
@@ -0,0 +1,39 @@
+---
+title: v0.21.0 - 4th October 2018
+slug: changelog/v0.21.0
+---
+
+* Deprecate the following resize-related functions:
+ `crop`, `embed`, `ignoreAspectRatio`, `max`, `min` and `withoutEnlargement`.
+ Access to these is now via options passed to the `resize` function.
+ For example:
+ `embed('north')` is now `resize(width, height, { fit: 'contain', position: 'north' })`,
+ `crop('attention')` is now `resize(width, height, { fit: 'cover', position: 'attention' })`,
+ `max().withoutEnlargement()` is now `resize(width, height, { fit: 'inside', withoutEnlargement: true })`.
+ [#1135](https://github.com/lovell/sharp/issues/1135)
+
+* Deprecate the `background` function.
+ Per-operation `background` options added to `resize`, `extend` and `flatten` operations.
+ [#1392](https://github.com/lovell/sharp/issues/1392)
+
+* Add `size` to `metadata` response (Stream and Buffer input only).
+ [#695](https://github.com/lovell/sharp/issues/695)
+
+* Switch from custom trim operation to `vips_find_trim`.
+ [#914](https://github.com/lovell/sharp/issues/914)
+
+* Add `chromaSubsampling` and `isProgressive` properties to `metadata` response.
+ [#1186](https://github.com/lovell/sharp/issues/1186)
+
+* Drop Node 4 support.
+ [#1212](https://github.com/lovell/sharp/issues/1212)
+
+* Enable SIMD convolution by default.
+ [#1213](https://github.com/lovell/sharp/issues/1213)
+
+* Add experimental prebuilt binaries for musl-based Linux.
+ [#1379](https://github.com/lovell/sharp/issues/1379)
+
+* Add support for arbitrary rotation angle via vips_rotate.
+ [#1385](https://github.com/lovell/sharp/pull/1385)
+ [@freezy](https://github.com/freezy)
diff --git a/docs/src/content/docs/changelog/v0.21.1.md b/docs/src/content/docs/changelog/v0.21.1.md
new file mode 100644
index 000000000..bb685ef2b
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.21.1.md
@@ -0,0 +1,31 @@
+---
+title: v0.21.1 - 7th December 2018
+slug: changelog/v0.21.1
+---
+
+* Install: support `sharp_dist_base_url` npm config, like existing `SHARP_DIST_BASE_URL`.
+ [#1422](https://github.com/lovell/sharp/pull/1422)
+ [@SethWen](https://github.com/SethWen)
+
+* Ensure `channel` metadata is correct for raw, greyscale output.
+ [#1425](https://github.com/lovell/sharp/issues/1425)
+
+* Add support for the "mitchell" kernel for image reductions.
+ [#1438](https://github.com/lovell/sharp/pull/1438)
+ [@Daiz](https://github.com/Daiz)
+
+* Allow separate parameters for gamma encoding and decoding.
+ [#1439](https://github.com/lovell/sharp/pull/1439)
+ [@Daiz](https://github.com/Daiz)
+
+* Build prototype with `Object.assign` to allow minification.
+ [#1475](https://github.com/lovell/sharp/pull/1475)
+ [@jaubourg](https://github.com/jaubourg)
+
+* Expose libvips' recombination matrix operation.
+ [#1477](https://github.com/lovell/sharp/pull/1477)
+ [@fromkeith](https://github.com/fromkeith)
+
+* Expose libvips' pyramid/tile options for TIFF output.
+ [#1483](https://github.com/lovell/sharp/pull/1483)
+ [@mbklein](https://github.com/mbklein)
diff --git a/docs/src/content/docs/changelog/v0.21.2.md b/docs/src/content/docs/changelog/v0.21.2.md
new file mode 100644
index 000000000..be7f6758d
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.21.2.md
@@ -0,0 +1,27 @@
+---
+title: v0.21.2 - 13th January 2019
+slug: changelog/v0.21.2
+---
+
+* Ensure all metadata is removed from PNG output unless `withMetadata` used.
+
+* Ensure shortest edge is at least one pixel after resizing.
+ [#1003](https://github.com/lovell/sharp/issues/1003)
+
+* Add `ensureAlpha` operation to add an alpha channel, if missing.
+ [#1153](https://github.com/lovell/sharp/issues/1153)
+
+* Expose `pages` and `pageHeight` metadata for multi-page input images.
+ [#1205](https://github.com/lovell/sharp/issues/1205)
+
+* Expose PNG output options requiring libimagequant.
+ [#1484](https://github.com/lovell/sharp/issues/1484)
+
+* Expose underlying error message for invalid input.
+ [#1505](https://github.com/lovell/sharp/issues/1505)
+
+* Prevent mutatation of options passed to `jpeg`.
+ [#1516](https://github.com/lovell/sharp/issues/1516)
+
+* Ensure forced output format applied correctly when output chaining.
+ [#1528](https://github.com/lovell/sharp/issues/1528)
diff --git a/docs/src/content/docs/changelog/v0.21.3.md b/docs/src/content/docs/changelog/v0.21.3.md
new file mode 100644
index 000000000..1cde28c63
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.21.3.md
@@ -0,0 +1,9 @@
+---
+title: v0.21.3 - 19th January 2019
+slug: changelog/v0.21.3
+---
+
+* Input image decoding now fails fast, set `failOnError` to change this behaviour.
+
+* Failed filesystem-based input now separates missing file and invalid format errors.
+ [#1542](https://github.com/lovell/sharp/issues/1542)
diff --git a/docs/src/content/docs/changelog/v0.22.0.md b/docs/src/content/docs/changelog/v0.22.0.md
new file mode 100644
index 000000000..797c743bc
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.22.0.md
@@ -0,0 +1,20 @@
+---
+title: v0.22.0 - 18th March 2019
+slug: changelog/v0.22.0
+---
+
+* Remove functions previously deprecated in v0.21.0:
+ `background`, `crop`, `embed`, `ignoreAspectRatio`, `max`, `min` and `withoutEnlargement`.
+
+* Add `composite` operation supporting multiple images and blend modes; deprecate `overlayWith`.
+ [#728](https://github.com/lovell/sharp/issues/728)
+
+* Add support for `pages` input option for multi-page input.
+ [#1566](https://github.com/lovell/sharp/issues/1566)
+
+* Allow Stream-based input of raw pixel data.
+ [#1579](https://github.com/lovell/sharp/issues/1579)
+
+* Add support for `page` input option to GIF and PDF.
+ [#1595](https://github.com/lovell/sharp/pull/1595)
+ [@ramiel](https://github.com/ramiel)
diff --git a/docs/src/content/docs/changelog/v0.22.1.md b/docs/src/content/docs/changelog/v0.22.1.md
new file mode 100644
index 000000000..cf8e3d464
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.22.1.md
@@ -0,0 +1,15 @@
+---
+title: v0.22.1 - 25th April 2019
+slug: changelog/v0.22.1
+---
+
+* Add `modulate` operation for brightness, saturation and hue.
+ [#1601](https://github.com/lovell/sharp/pull/1601)
+ [@Goues](https://github.com/Goues)
+
+* Improve help messaging should `require("sharp")` fail.
+ [#1638](https://github.com/lovell/sharp/pull/1638)
+ [@sidharthachatterjee](https://github.com/sidharthachatterjee)
+
+* Add support for Node 12.
+ [#1668](https://github.com/lovell/sharp/issues/1668)
diff --git a/docs/src/content/docs/changelog/v0.23.0.md b/docs/src/content/docs/changelog/v0.23.0.md
new file mode 100644
index 000000000..24b18827c
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.23.0.md
@@ -0,0 +1,32 @@
+---
+title: v0.23.0 - 29th July 2019
+slug: changelog/v0.23.0
+---
+
+* Remove `overlayWith` previously deprecated in v0.22.0.
+
+* Add experimental support for HEIF images. Requires libvips compiled with libheif.
+ [#1105](https://github.com/lovell/sharp/issues/1105)
+
+* Expose libwebp `smartSubsample` and `reductionEffort` options.
+ [#1545](https://github.com/lovell/sharp/issues/1545)
+
+* Add experimental support for Worker Threads.
+ [#1558](https://github.com/lovell/sharp/issues/1558)
+
+* Use libvips' built-in CMYK and sRGB profiles when required.
+ [#1619](https://github.com/lovell/sharp/issues/1619)
+
+* Drop support for Node.js versions 6 and 11.
+ [#1674](https://github.com/lovell/sharp/issues/1674)
+
+* Expose `skipBlanks` option for tile-based output.
+ [#1687](https://github.com/lovell/sharp/pull/1687)
+ [@RaboliotTheGrey](https://github.com/RaboliotTheGrey)
+
+* Allow use of `failOnError` option with Stream-based input.
+ [#1691](https://github.com/lovell/sharp/issues/1691)
+
+* Fix rotate/extract ordering for non-90 angles.
+ [#1755](https://github.com/lovell/sharp/pull/1755)
+ [@iovdin](https://github.com/iovdin)
diff --git a/docs/src/content/docs/changelog/v0.23.1.md b/docs/src/content/docs/changelog/v0.23.1.md
new file mode 100644
index 000000000..c180d9952
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.23.1.md
@@ -0,0 +1,24 @@
+---
+title: v0.23.1 - 26th September 2019
+slug: changelog/v0.23.1
+---
+
+* Ensure `sharp.format.vips` is present and correct (filesystem only).
+ [#1813](https://github.com/lovell/sharp/issues/1813)
+
+* Ensure invalid `width` and `height` provided as options to `resize` throw.
+ [#1817](https://github.com/lovell/sharp/issues/1817)
+
+* Allow use of 'heic' and 'heif' identifiers with `toFormat`.
+ [#1834](https://github.com/lovell/sharp/pull/1834)
+ [@jaubourg](https://github.com/jaubourg)
+
+* Add `premultiplied` option to `composite` operation.
+ [#1835](https://github.com/lovell/sharp/pull/1835)
+ [@Andargor](https://github.com/Andargor)
+
+* Allow instance reuse with differing `toBuffer` options.
+ [#1860](https://github.com/lovell/sharp/pull/1860)
+ [@RaboliotTheGrey](https://github.com/RaboliotTheGrey)
+
+* Ensure image is at least 3x3 pixels before attempting trim operation.
diff --git a/docs/src/content/docs/changelog/v0.23.2.md b/docs/src/content/docs/changelog/v0.23.2.md
new file mode 100644
index 000000000..1eb59491d
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.23.2.md
@@ -0,0 +1,12 @@
+---
+title: v0.23.2 - 28th October 2019
+slug: changelog/v0.23.2
+---
+
+* Add `background` option to tile output operation.
+ [#1924](https://github.com/lovell/sharp/pull/1924)
+ [@neave](https://github.com/neave)
+
+* Add support for Node.js 13.
+ [#1932](https://github.com/lovell/sharp/pull/1932)
+ [@MayhemYDG](https://github.com/MayhemYDG)
diff --git a/docs/src/content/docs/changelog/v0.23.3.md b/docs/src/content/docs/changelog/v0.23.3.md
new file mode 100644
index 000000000..4c19795a5
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.23.3.md
@@ -0,0 +1,18 @@
+---
+title: v0.23.3 - 17th November 2019
+slug: changelog/v0.23.3
+---
+
+* Ensure `trim` operation supports images contained in the alpha channel.
+ [#1597](https://github.com/lovell/sharp/issues/1597)
+
+* Ensure tile `overlap` option works as expected.
+ [#1921](https://github.com/lovell/sharp/pull/1921)
+ [@rustyguts](https://github.com/rustyguts)
+
+* Allow compilation on FreeBSD and variants (broken since v0.23.0)
+ [#1952](https://github.com/lovell/sharp/pull/1952)
+ [@pouya-eghbali](https://github.com/pouya-eghbali)
+
+* Ensure `modulate` and other colour-based operations can co-exist.
+ [#1958](https://github.com/lovell/sharp/issues/1958)
diff --git a/docs/src/content/docs/changelog/v0.23.4.md b/docs/src/content/docs/changelog/v0.23.4.md
new file mode 100644
index 000000000..3d8bfed73
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.23.4.md
@@ -0,0 +1,12 @@
+---
+title: v0.23.4 - 5th December 2019
+slug: changelog/v0.23.4
+---
+
+* Handle zero-length Buffer objects when using Node.js v13.2.0+.
+
+* Expose raw TIFFTAG_PHOTOSHOP metadata.
+ [#1600](https://github.com/lovell/sharp/issues/1600)
+
+* Improve thread safety by using copy-on-write when updating metadata.
+ [#1986](https://github.com/lovell/sharp/issues/1986)
diff --git a/docs/src/content/docs/changelog/v0.24.0.md b/docs/src/content/docs/changelog/v0.24.0.md
new file mode 100644
index 000000000..378dad771
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.24.0.md
@@ -0,0 +1,28 @@
+---
+title: v0.24.0 - 16th January 2020
+slug: changelog/v0.24.0
+---
+
+* Drop support for Node.js 8.
+ [#1910](https://github.com/lovell/sharp/issues/1910)
+
+* Drop support for undefined input where options also provided.
+ [#1768](https://github.com/lovell/sharp/issues/1768)
+
+* Move `limitInputPixels` and `sequentialRead` to input options, deprecating functions of the same name.
+
+* Expose `delay` and `loop` metadata for animated images.
+ [#1905](https://github.com/lovell/sharp/issues/1905)
+
+* Ensure correct colour output for 16-bit, 2-channel PNG input with ICC profile.
+ [#2013](https://github.com/lovell/sharp/issues/2013)
+
+* Prevent use of sequentialRead for rotate operations.
+ [#2016](https://github.com/lovell/sharp/issues/2016)
+
+* Correctly bind max width and height values when using withoutEnlargement.
+ [#2024](https://github.com/lovell/sharp/pull/2024)
+ [@BrychanOdlum](https://github.com/BrychanOdlum)
+
+* Add support for input with 16-bit RGB profile.
+ [#2037](https://github.com/lovell/sharp/issues/2037)
diff --git a/docs/src/content/docs/changelog/v0.24.1.md b/docs/src/content/docs/changelog/v0.24.1.md
new file mode 100644
index 000000000..2155c2005
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.24.1.md
@@ -0,0 +1,10 @@
+---
+title: v0.24.1 - 15th February 2020
+slug: changelog/v0.24.1
+---
+
+* Prevent use of sequentialRead for EXIF-based rotate operation.
+ [#2042](https://github.com/lovell/sharp/issues/2042)
+
+* Ensure RGBA LZW TIFF returns correct channel count.
+ [#2064](https://github.com/lovell/sharp/issues/2064)
diff --git a/docs/src/content/docs/changelog/v0.25.0.md b/docs/src/content/docs/changelog/v0.25.0.md
new file mode 100644
index 000000000..b42978a98
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.25.0.md
@@ -0,0 +1,18 @@
+---
+title: v0.25.0 - 7th March 2020
+slug: changelog/v0.25.0
+---
+
+* Remove `limitInputPixels` and `sequentialRead` previously deprecated in v0.24.0.
+
+* Migrate internals to N-API.
+ [#1282](https://github.com/lovell/sharp/issues/1282)
+
+* Add support for 32-bit Windows.
+ [#2088](https://github.com/lovell/sharp/issues/2088)
+
+* Ensure correct ordering of rotate-then-trim operations.
+ [#2087](https://github.com/lovell/sharp/issues/2087)
+
+* Ensure composite accepts `limitInputPixels` and `sequentialRead` input options.
+ [#2099](https://github.com/lovell/sharp/issues/2099)
diff --git a/docs/src/content/docs/changelog/v0.25.1.md b/docs/src/content/docs/changelog/v0.25.1.md
new file mode 100644
index 000000000..af0fe39d4
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.25.1.md
@@ -0,0 +1,7 @@
+---
+title: v0.25.1 - 7th March 2020
+slug: changelog/v0.25.1
+---
+
+* Ensure prebuilt binaries are fetched based on N-API version.
+ [#2117](https://github.com/lovell/sharp/issues/2117)
diff --git a/docs/src/content/docs/changelog/v0.25.2.md b/docs/src/content/docs/changelog/v0.25.2.md
new file mode 100644
index 000000000..298db561a
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.25.2.md
@@ -0,0 +1,19 @@
+---
+title: v0.25.2 - 20th March 2020
+slug: changelog/v0.25.2
+---
+
+* Provide prebuilt binaries for Linux ARM64v8.
+
+* Add IIIF layout support to tile-based output.
+ [#2098](https://github.com/lovell/sharp/pull/2098)
+ [@edsilv](https://github.com/edsilv)
+
+* Ensure input options are consistently and correctly detected.
+ [#2118](https://github.com/lovell/sharp/issues/2118)
+
+* Ensure N-API prebuilt binaries work on RHEL7 and its derivatives.
+ [#2119](https://github.com/lovell/sharp/issues/2119)
+
+* Ensure AsyncWorker options are persisted.
+ [#2130](https://github.com/lovell/sharp/issues/2130)
diff --git a/docs/src/content/docs/changelog/v0.25.3.md b/docs/src/content/docs/changelog/v0.25.3.md
new file mode 100644
index 000000000..0a1a76038
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.25.3.md
@@ -0,0 +1,14 @@
+---
+title: v0.25.3 - 17th May 2020
+slug: changelog/v0.25.3
+---
+
+* Ensure libvips is initialised only once, improves worker thread safety.
+ [#2143](https://github.com/lovell/sharp/issues/2143)
+
+* Ensure npm platform flag is respected when copying DLLs.
+ [#2188](https://github.com/lovell/sharp/pull/2188)
+ [@dimadeveatii](https://github.com/dimadeveatii)
+
+* Allow SVG input with large inline images to be parsed.
+ [#2195](https://github.com/lovell/sharp/issues/2195)
diff --git a/docs/src/content/docs/changelog/v0.25.4.md b/docs/src/content/docs/changelog/v0.25.4.md
new file mode 100644
index 000000000..6bd4deb59
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.25.4.md
@@ -0,0 +1,25 @@
+---
+title: v0.25.4 - 12th June 2020
+slug: changelog/v0.25.4
+---
+
+* Allow libvips binary location override where version is appended.
+ [#2217](https://github.com/lovell/sharp/pull/2217)
+ [@malice00](https://github.com/malice00)
+
+* Enable PNG palette when setting quality, colours, colors or dither.
+ [#2226](https://github.com/lovell/sharp/pull/2226)
+ [@romaleev](https://github.com/romaleev)
+
+* Add `level` constructor option to use a specific level of a multi-level image.
+ Expose `levels` metadata for multi-level images.
+ [#2222](https://github.com/lovell/sharp/issues/2222)
+
+* Add support for named `alpha` channel to `extractChannel` operation.
+ [#2138](https://github.com/lovell/sharp/issues/2138)
+
+* Add experimental `sharpness` calculation to `stats()` response.
+ [#2251](https://github.com/lovell/sharp/issues/2251)
+
+* Emit `warning` event for non-critical processing problems.
+ [#2032](https://github.com/lovell/sharp/issues/2032)
diff --git a/docs/src/content/docs/changelog/v0.26.0.md b/docs/src/content/docs/changelog/v0.26.0.md
new file mode 100644
index 000000000..6fedd7e35
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.26.0.md
@@ -0,0 +1,33 @@
+---
+title: v0.26.0 - 25th August 2020
+slug: changelog/v0.26.0
+---
+
+* Prebuilt libvips binaries are now statically-linked and Brotli-compressed, requiring Node.js 10.16.0+.
+
+* TIFF output `squash` is replaced by `bitdepth` to reduce to 1, 2 or 4 bit.
+
+* JPEG output `quality` >= 90 no longer automatically sets `chromaSubsampling` to `4:4:4`.
+
+* Add most `dominant` colour to image `stats`.
+ [#640](https://github.com/lovell/sharp/issues/640)
+
+* Add support for animated GIF (requires \*magick) and WebP output.
+ [#2012](https://github.com/lovell/sharp/pull/2012)
+ [@deftomat](https://github.com/deftomat)
+
+* Add support for libvips ImageMagick v7 loaders.
+ [#2258](https://github.com/lovell/sharp/pull/2258)
+ [@vouillon](https://github.com/vouillon)
+
+* Allow multi-page input via \*magick.
+ [#2259](https://github.com/lovell/sharp/pull/2259)
+ [@vouillon](https://github.com/vouillon)
+
+* Add support to `withMetadata` for custom ICC profile.
+ [#2271](https://github.com/lovell/sharp/pull/2271)
+ [@roborourke](https://github.com/roborourke)
+
+* Ensure prebuilt binaries for ARM default to v7 when using Electron.
+ [#2292](https://github.com/lovell/sharp/pull/2292)
+ [@diegodev3](https://github.com/diegodev3)
diff --git a/docs/src/content/docs/changelog/v0.26.1.md b/docs/src/content/docs/changelog/v0.26.1.md
new file mode 100644
index 000000000..080b05da3
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.26.1.md
@@ -0,0 +1,22 @@
+---
+title: v0.26.1 - 20th September 2020
+slug: changelog/v0.26.1
+---
+
+* Ensure correct pageHeight when verifying multi-page image dimensions.
+ [#2343](https://github.com/lovell/sharp/pull/2343)
+ [@derom](https://github.com/derom)
+
+* Allow input density range up to 100000 DPI.
+ [#2348](https://github.com/lovell/sharp/pull/2348)
+ [@stefanprobst](https://github.com/stefanprobst)
+
+* Ensure animation-related properties can be set for Stream-based input.
+ [#2369](https://github.com/lovell/sharp/pull/2369)
+ [@AcrylicShrimp](https://github.com/AcrylicShrimp)
+
+* Ensure `stats` can be calculated for 1x1 input.
+ [#2372](https://github.com/lovell/sharp/issues/2372)
+
+* Ensure animated GIF output is optimised.
+ [#2376](https://github.com/lovell/sharp/issues/2376)
diff --git a/docs/src/content/docs/changelog/v0.26.2.md b/docs/src/content/docs/changelog/v0.26.2.md
new file mode 100644
index 000000000..2031300a2
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.26.2.md
@@ -0,0 +1,15 @@
+---
+title: v0.26.2 - 14th October 2020
+slug: changelog/v0.26.2
+---
+
+* Add support for EXR input. Requires libvips compiled with OpenEXR.
+ [#698](https://github.com/lovell/sharp/issues/698)
+
+* Ensure support for yarn v2.
+ [#2379](https://github.com/lovell/sharp/pull/2379)
+ [@jalovatt](https://github.com/jalovatt)
+
+* Add centre/center option to tile-based output.
+ [#2397](https://github.com/lovell/sharp/pull/2397)
+ [@beig](https://github.com/beig)
diff --git a/docs/src/content/docs/changelog/v0.26.3.md b/docs/src/content/docs/changelog/v0.26.3.md
new file mode 100644
index 000000000..a12a54480
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.26.3.md
@@ -0,0 +1,12 @@
+---
+title: v0.26.3 - 16th November 2020
+slug: changelog/v0.26.3
+---
+
+* Expose libvips' affine operation.
+ [#2336](https://github.com/lovell/sharp/pull/2336)
+ [@guillevc](https://github.com/guillevc)
+
+* Fallback to tar.gz for prebuilt libvips when Brotli not available.
+ [#2412](https://github.com/lovell/sharp/pull/2412)
+ [@ascorbic](https://github.com/ascorbic)
diff --git a/docs/src/content/docs/changelog/v0.27.0.md b/docs/src/content/docs/changelog/v0.27.0.md
new file mode 100644
index 000000000..d21378479
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.27.0.md
@@ -0,0 +1,15 @@
+---
+title: v0.27.0 - 22nd December 2020
+slug: changelog/v0.27.0
+---
+
+* Add support for AVIF to prebuilt binaries.
+
+* Remove experimental status from `heif` output, defaults are now AVIF-centric.
+
+* Allow negative top/left offsets for composite operation.
+ [#2391](https://github.com/lovell/sharp/pull/2391)
+ [@CurosMJ](https://github.com/CurosMJ)
+
+* Ensure all platforms use fontconfig for font rendering.
+ [#2399](https://github.com/lovell/sharp/issues/2399)
diff --git a/docs/src/content/docs/changelog/v0.27.1.md b/docs/src/content/docs/changelog/v0.27.1.md
new file mode 100644
index 000000000..09b24da60
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.27.1.md
@@ -0,0 +1,19 @@
+---
+title: v0.27.1 - 27th January 2021
+slug: changelog/v0.27.1
+---
+
+* Ensure TIFF is cast when using float predictor.
+ [#2502](https://github.com/lovell/sharp/pull/2502)
+ [@randyridge](https://github.com/randyridge)
+
+* Add support for Uint8Array and Uint8ClampedArray input.
+ [#2511](https://github.com/lovell/sharp/pull/2511)
+ [@leon](https://github.com/leon)
+
+* Revert: ensure all platforms use fontconfig for font rendering.
+ [#2515](https://github.com/lovell/sharp/issues/2515)
+
+* Expose libvips gaussnoise operation to allow creation of Gaussian noise.
+ [#2527](https://github.com/lovell/sharp/pull/2527)
+ [@alza54](https://github.com/alza54)
diff --git a/docs/src/content/docs/changelog/v0.27.2.md b/docs/src/content/docs/changelog/v0.27.2.md
new file mode 100644
index 000000000..b8eb9c386
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.27.2.md
@@ -0,0 +1,20 @@
+---
+title: v0.27.2 - 22nd February 2021
+slug: changelog/v0.27.2
+---
+
+* macOS: Prevent use of globally-installed ARM64 libvips with Rosetta x64 emulation.
+ [#2460](https://github.com/lovell/sharp/issues/2460)
+
+* Linux (musl): Prevent use of prebuilt linuxmusl-x64 binaries with musl >= 1.2.0.
+ [#2570](https://github.com/lovell/sharp/issues/2570)
+
+* Improve 16-bit grey+alpha support by using libvips' `has_alpha` detection.
+ [#2569](https://github.com/lovell/sharp/issues/2569)
+
+* Allow the use of non lower case extensions with `toFormat`.
+ [#2581](https://github.com/lovell/sharp/pull/2581)
+ [@florian-busch](https://github.com/florian-busch)
+
+* Allow use of `recomb` operation with single channel input.
+ [#2584](https://github.com/lovell/sharp/issues/2584)
diff --git a/docs/src/content/docs/changelog/v0.28.0.md b/docs/src/content/docs/changelog/v0.28.0.md
new file mode 100644
index 000000000..e3a72f815
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.28.0.md
@@ -0,0 +1,32 @@
+---
+title: v0.28.0 - 29th March 2021
+slug: changelog/v0.28.0
+---
+
+* Prebuilt binaries now include mozjpeg and libimagequant (BSD 2-Clause).
+
+* Prebuilt binaries limit AVIF support to the most common 8-bit depth.
+
+* Add `mozjpeg` option to `jpeg` method, sets mozjpeg defaults.
+
+* Reduce the default PNG `compressionLevel` to the more commonly used 6.
+
+* Reduce concurrency on glibc-based Linux when using the default memory allocator to help prevent fragmentation.
+
+* Default missing edge properties of extend operation to zero.
+ [#2578](https://github.com/lovell/sharp/issues/2578)
+
+* Ensure composite does not clip top and left offsets.
+ [#2594](https://github.com/lovell/sharp/pull/2594)
+ [@SHG42](https://github.com/SHG42)
+
+* Improve error handling of network failure at install time.
+ [#2608](https://github.com/lovell/sharp/pull/2608)
+ [@abradley](https://github.com/abradley)
+
+* Ensure `@id` attribute can be set for IIIF tile-based output.
+ [#2612](https://github.com/lovell/sharp/issues/2612)
+ [@edsilv](https://github.com/edsilv)
+
+* Ensure composite replicates the correct number of tiles for centred gravities.
+ [#2626](https://github.com/lovell/sharp/issues/2626)
diff --git a/docs/src/content/docs/changelog/v0.28.1.md b/docs/src/content/docs/changelog/v0.28.1.md
new file mode 100644
index 000000000..38e11a38a
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.28.1.md
@@ -0,0 +1,15 @@
+---
+title: v0.28.1 - 5th April 2021
+slug: changelog/v0.28.1
+---
+
+* Ensure all installation errors are logged with a more obvious prefix.
+
+* Allow `withMetadata` to set and update EXIF metadata.
+ [#650](https://github.com/lovell/sharp/issues/650)
+
+* Add support for OME-TIFF Sub Image File Directories (subIFD).
+ [#2557](https://github.com/lovell/sharp/issues/2557)
+
+* Allow `ensureAlpha` to set the alpha transparency level.
+ [#2634](https://github.com/lovell/sharp/issues/2634)
diff --git a/docs/src/content/docs/changelog/v0.28.2.md b/docs/src/content/docs/changelog/v0.28.2.md
new file mode 100644
index 000000000..9f067c44f
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.28.2.md
@@ -0,0 +1,26 @@
+---
+title: v0.28.2 - 10th May 2021
+slug: changelog/v0.28.2
+---
+
+* Allow `withMetadata` to set `density`.
+ [#967](https://github.com/lovell/sharp/issues/967)
+
+* Skip shrink-on-load where one dimension <4px.
+ [#2653](https://github.com/lovell/sharp/issues/2653)
+
+* Allow escaped proxy credentials.
+ [#2664](https://github.com/lovell/sharp/pull/2664)
+ [@msalettes](https://github.com/msalettes)
+
+* Add `premultiplied` flag for raw pixel data input.
+ [#2685](https://github.com/lovell/sharp/pull/2685)
+ [@mnutt](https://github.com/mnutt)
+
+* Detect empty input and throw a helpful error.
+ [#2687](https://github.com/lovell/sharp/pull/2687)
+ [@JakobJingleheimer](https://github.com/JakobJingleheimer)
+
+* Add install-time flag to skip version compatibility checks.
+ [#2692](https://github.com/lovell/sharp/pull/2692)
+ [@xemle](https://github.com/xemle)
diff --git a/docs/src/content/docs/changelog/v0.28.3.md b/docs/src/content/docs/changelog/v0.28.3.md
new file mode 100644
index 000000000..dff933269
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.28.3.md
@@ -0,0 +1,13 @@
+---
+title: v0.28.3 - 24th May 2021
+slug: changelog/v0.28.3
+---
+
+* Ensure presence of libvips, vendored or global, before invoking node-gyp.
+
+* Skip shrink-on-load for multi-page WebP.
+ [#2714](https://github.com/lovell/sharp/issues/2714)
+
+* Add contrast limiting adaptive histogram equalization (CLAHE) operator.
+ [#2726](https://github.com/lovell/sharp/pull/2726)
+ [@baparham](https://github.com/baparham)
diff --git a/docs/src/content/docs/changelog/v0.29.0.md b/docs/src/content/docs/changelog/v0.29.0.md
new file mode 100644
index 000000000..087545991
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.29.0.md
@@ -0,0 +1,35 @@
+---
+title: v0.29.0 - 17th August 2021
+slug: changelog/v0.29.0
+---
+
+* Drop support for Node.js 10, now requires Node.js >= 12.13.0.
+
+* Add `background` property to PNG and GIF image metadata.
+
+* Add `compression` property to HEIF image metadata.
+ [#2504](https://github.com/lovell/sharp/issues/2504)
+
+* AVIF encoding now defaults to `4:4:4` chroma subsampling.
+ [#2562](https://github.com/lovell/sharp/issues/2562)
+
+* Allow multiple platform-arch binaries in same `node_modules` installation tree.
+ [#2575](https://github.com/lovell/sharp/issues/2575)
+
+* Default to single-channel `b-w` space when `extractChannel` is used.
+ [#2658](https://github.com/lovell/sharp/issues/2658)
+
+* Allow installation directory to contain spaces (regression in v0.26.0).
+ [#2777](https://github.com/lovell/sharp/issues/2777)
+
+* Add `pipelineColourspace` operator to set the processing space.
+ [#2704](https://github.com/lovell/sharp/pull/2704)
+ [@Daiz](https://github.com/Daiz)
+
+* Allow bit depth to be set when using raw input and output.
+ [#2762](https://github.com/lovell/sharp/pull/2762)
+ [@mart-jansink](https://github.com/mart-jansink)
+
+* Allow `negate` to act only on non-alpha channels.
+ [#2808](https://github.com/lovell/sharp/pull/2808)
+ [@rexxars](https://github.com/rexxars)
diff --git a/docs/src/content/docs/changelog/v0.29.1.md b/docs/src/content/docs/changelog/v0.29.1.md
new file mode 100644
index 000000000..58809cbf4
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.29.1.md
@@ -0,0 +1,30 @@
+---
+title: v0.29.1 - 7th September 2021
+slug: changelog/v0.29.1
+---
+
+* Add `lightness` option to `modulate` operation.
+ [#2846](https://github.com/lovell/sharp/pull/2846)
+
+* Ensure correct PNG bitdepth is set based on number of colours.
+ [#2855](https://github.com/lovell/sharp/issues/2855)
+
+* Ensure background is always premultiplied when compositing.
+ [#2858](https://github.com/lovell/sharp/issues/2858)
+
+* Ensure images with P3 profiles retain full gamut.
+ [#2862](https://github.com/lovell/sharp/issues/2862)
+
+* Add support for libvips compiled with OpenJPEG.
+ [#2868](https://github.com/lovell/sharp/pull/2868)
+
+* Remove unsupported animation properties from AVIF output.
+ [#2870](https://github.com/lovell/sharp/issues/2870)
+
+* Resolve paths before comparing input/output filenames.
+ [#2878](https://github.com/lovell/sharp/pull/2878)
+ [@rexxars](https://github.com/rexxars)
+
+* Allow use of speed 9 (fastest) for HEIF encoding.
+ [#2879](https://github.com/lovell/sharp/pull/2879)
+ [@rexxars](https://github.com/rexxars)
diff --git a/docs/src/content/docs/changelog/v0.29.2.md b/docs/src/content/docs/changelog/v0.29.2.md
new file mode 100644
index 000000000..0628963f0
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.29.2.md
@@ -0,0 +1,22 @@
+---
+title: v0.29.2 - 21st October 2021
+slug: changelog/v0.29.2
+---
+
+* Add `timeout` function to limit processing time.
+
+* Ensure `sharp.versions` is populated from vendored libvips.
+
+* Remove animation properties from single page images.
+ [#2890](https://github.com/lovell/sharp/issues/2890)
+
+* Allow use of 'tif' to select TIFF output.
+ [#2893](https://github.com/lovell/sharp/pull/2893)
+ [@erf](https://github.com/erf)
+
+* Improve error message on Windows for version conflict.
+ [#2918](https://github.com/lovell/sharp/pull/2918)
+ [@dkrnl](https://github.com/dkrnl)
+
+* Throw error rather than exit when invalid binaries detected.
+ [#2931](https://github.com/lovell/sharp/issues/2931)
diff --git a/docs/src/content/docs/changelog/v0.29.3.md b/docs/src/content/docs/changelog/v0.29.3.md
new file mode 100644
index 000000000..e344d790e
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.29.3.md
@@ -0,0 +1,11 @@
+---
+title: v0.29.3 - 14th November 2021
+slug: changelog/v0.29.3
+---
+
+* Ensure correct dimensions when containing image resized to 1px.
+ [#2951](https://github.com/lovell/sharp/issues/2951)
+
+* Impute TIFF `xres`/`yres` from `density` provided to `withMetadata`.
+ [#2952](https://github.com/lovell/sharp/pull/2952)
+ [@mbklein](https://github.com/mbklein)
diff --git a/docs/src/content/docs/changelog/v0.30.0.md b/docs/src/content/docs/changelog/v0.30.0.md
new file mode 100644
index 000000000..2605fbcaa
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.0.md
@@ -0,0 +1,48 @@
+---
+title: v0.30.0 - 1st February 2022
+slug: changelog/v0.30.0
+---
+
+* Add support for GIF output to prebuilt binaries.
+
+* Reduce minimum Linux ARM64v8 glibc requirement to 2.17.
+
+* Verify prebuilt binaries with a Subresource Integrity check.
+
+* Standardise WebP `effort` option name, deprecate `reductionEffort`.
+
+* Standardise HEIF `effort` option name, deprecate `speed`.
+
+* Add support for IIIF v3 tile-based output.
+
+* Expose control over CPU effort for palette-based PNG output.
+ [#2541](https://github.com/lovell/sharp/issues/2541)
+
+* Improve animated (multi-page) image resize and extract.
+ [#2789](https://github.com/lovell/sharp/pull/2789)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Expose platform and architecture of vendored binaries as `sharp.vendor`.
+ [#2928](https://github.com/lovell/sharp/issues/2928)
+
+* Ensure 16-bit PNG output uses correct bitdepth.
+ [#2958](https://github.com/lovell/sharp/pull/2958)
+ [@gforge](https://github.com/gforge)
+
+* Properly emit close events for duplex streams.
+ [#2976](https://github.com/lovell/sharp/pull/2976)
+ [@driannaude](https://github.com/driannaude)
+
+* Expose `unlimited` option for SVG and PNG input, switches off safety features.
+ [#2984](https://github.com/lovell/sharp/issues/2984)
+
+* Add `withoutReduction` option to resize operation.
+ [#3006](https://github.com/lovell/sharp/pull/3006)
+ [@christopherbradleybanks](https://github.com/christopherbradleybanks)
+
+* Add `resolutionUnit` as `tiff` option and expose in metadata.
+ [#3023](https://github.com/lovell/sharp/pull/3023)
+ [@ompal-sisodiya](https://github.com/ompal-sisodiya)
+
+* Ensure rotate-then-extract works with EXIF mirroring.
+ [#3024](https://github.com/lovell/sharp/issues/3024)
diff --git a/docs/src/content/docs/changelog/v0.30.1.md b/docs/src/content/docs/changelog/v0.30.1.md
new file mode 100644
index 000000000..06f890da8
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.1.md
@@ -0,0 +1,19 @@
+---
+title: v0.30.1 - 9th February 2022
+slug: changelog/v0.30.1
+---
+
+* Allow use of `toBuffer` and `toFile` on the same instance.
+ [#3044](https://github.com/lovell/sharp/issues/3044)
+
+* Skip shrink-on-load for known libjpeg rounding errors.
+ [#3066](https://github.com/lovell/sharp/issues/3066)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Ensure withoutReduction does not interfere with contain/crop/embed.
+ [#3081](https://github.com/lovell/sharp/pull/3081)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Ensure affine interpolator is correctly finalised.
+ [#3083](https://github.com/lovell/sharp/pull/3083)
+ [@kleisauke](https://github.com/kleisauke)
diff --git a/docs/src/content/docs/changelog/v0.30.2.md b/docs/src/content/docs/changelog/v0.30.2.md
new file mode 100644
index 000000000..1b5c7e1c5
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.2.md
@@ -0,0 +1,17 @@
+---
+title: v0.30.2 - 2nd March 2022
+slug: changelog/v0.30.2
+---
+
+* Improve performance and accuracy when compositing multiple images.
+ [#2286](https://github.com/lovell/sharp/issues/2286)
+
+* Expand pkgconfig search path for wider BSD support.
+ [#3106](https://github.com/lovell/sharp/issues/3106)
+
+* Ensure Windows C++ runtime is linked statically (regression in 0.30.0).
+ [#3110](https://github.com/lovell/sharp/pull/3110)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Temporarily ignore greyscale ICC profiles to workaround lcms bug.
+ [#3112](https://github.com/lovell/sharp/issues/3112)
diff --git a/docs/src/content/docs/changelog/v0.30.3.md b/docs/src/content/docs/changelog/v0.30.3.md
new file mode 100644
index 000000000..77a2584a8
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.3.md
@@ -0,0 +1,13 @@
+---
+title: v0.30.3 - 14th March 2022
+slug: changelog/v0.30.3
+---
+
+* Allow `sharpen` options to be provided more consistently as an Object.
+ [#2561](https://github.com/lovell/sharp/issues/2561)
+
+* Expose `x1`, `y2` and `y3` parameters of `sharpen` operation.
+ [#2935](https://github.com/lovell/sharp/issues/2935)
+
+* Prevent double unpremultiply with some composite blend modes (regression in 0.30.2).
+ [#3118](https://github.com/lovell/sharp/issues/3118)
diff --git a/docs/src/content/docs/changelog/v0.30.4.md b/docs/src/content/docs/changelog/v0.30.4.md
new file mode 100644
index 000000000..a4f0040bf
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.4.md
@@ -0,0 +1,20 @@
+---
+title: v0.30.4 - 18th April 2022
+slug: changelog/v0.30.4
+---
+
+* Increase control over sensitivity to invalid images via `failOn`, deprecate `failOnError` (equivalent to `failOn: 'warning'`).
+
+* Ensure `create` input image has correct bit depth and colour space.
+ [#3139](https://github.com/lovell/sharp/issues/3139)
+
+* Add support for `TypedArray` input with `byteOffset` and `length`.
+ [#3146](https://github.com/lovell/sharp/pull/3146)
+ [@codepage949](https://github.com/codepage949)
+
+* Improve error message when attempting to render SVG input greater than 32767x32767.
+ [#3167](https://github.com/lovell/sharp/issues/3167)
+
+* Add missing file name to 'Input file is missing' error message.
+ [#3178](https://github.com/lovell/sharp/pull/3178)
+ [@Brodan](https://github.com/Brodan)
diff --git a/docs/src/content/docs/changelog/v0.30.5.md b/docs/src/content/docs/changelog/v0.30.5.md
new file mode 100644
index 000000000..406357619
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.5.md
@@ -0,0 +1,19 @@
+---
+title: v0.30.5 - 23rd May 2022
+slug: changelog/v0.30.5
+---
+
+* Install: pass `PKG_CONFIG_PATH` via env rather than substitution.
+ [@dwisiswant0](https://github.com/dwisiswant0)
+
+* Add support for `--libc` flag to improve cross-platform installation.
+ [#3160](https://github.com/lovell/sharp/pull/3160)
+ [@joonamo](https://github.com/joonamo)
+
+* Allow installation of prebuilt libvips binaries from filesystem.
+ [#3196](https://github.com/lovell/sharp/pull/3196)
+ [@ankurparihar](https://github.com/ankurparihar)
+
+* Fix rotate-then-extract for EXIF orientation 2.
+ [#3218](https://github.com/lovell/sharp/pull/3218)
+ [@jakob0fischl](https://github.com/jakob0fischl)
diff --git a/docs/src/content/docs/changelog/v0.30.6.md b/docs/src/content/docs/changelog/v0.30.6.md
new file mode 100644
index 000000000..340921040
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.6.md
@@ -0,0 +1,10 @@
+---
+title: v0.30.6 - 30th May 2022
+slug: changelog/v0.30.6
+---
+
+* Allow values for `limitInputPixels` larger than 32-bit.
+ [#3238](https://github.com/lovell/sharp/issues/3238)
+
+* Ensure brew-installed `vips` can be detected (regression in 0.30.5).
+ [#3239](https://github.com/lovell/sharp/issues/3239)
diff --git a/docs/src/content/docs/changelog/v0.30.7.md b/docs/src/content/docs/changelog/v0.30.7.md
new file mode 100644
index 000000000..fd90d905c
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.30.7.md
@@ -0,0 +1,15 @@
+---
+title: v0.30.7 - 22nd June 2022
+slug: changelog/v0.30.7
+---
+
+* Ensure tiled composition always works with outside resizing.
+ [#3227](https://github.com/lovell/sharp/issues/3227)
+
+* Allow WebP encoding effort of 0.
+ [#3261](https://github.com/lovell/sharp/pull/3261)
+ [@AlexanderTheGrey](https://github.com/AlexanderTheGrey)
+
+* Prevent upsampling via libwebp.
+ [#3267](https://github.com/lovell/sharp/pull/3267)
+ [@blacha](https://github.com/blacha)
diff --git a/docs/src/content/docs/changelog/v0.31.0.md b/docs/src/content/docs/changelog/v0.31.0.md
new file mode 100644
index 000000000..1998f9be8
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.31.0.md
@@ -0,0 +1,63 @@
+---
+title: v0.31.0 - 5th September 2022
+slug: changelog/v0.31.0
+---
+
+* Drop support for Node.js 12, now requires Node.js >= 14.15.0.
+
+* GIF output now re-uses input palette if possible. Use `reoptimise` option to generate a new palette.
+
+* Add WebP `minSize` and `mixed` options for greater control over animation frames.
+
+* Remove previously-deprecated WebP `reductionEffort` and HEIF `speed` options. Use `effort` to control these.
+
+* The `flip` and `flop` operations will now occur before the `rotate` operation.
+
+* Improve `normalise` operation with use of histogram.
+ [#200](https://github.com/lovell/sharp/issues/200)
+
+* Use combined bounding box of alpha and non-alpha channels for `trim` operation.
+ [#2166](https://github.com/lovell/sharp/issues/2166)
+
+* Add Buffer and Stream support to tile-based output.
+ [#2238](https://github.com/lovell/sharp/issues/2238)
+
+* Add input `fileSuffix` and output `alias` to `format` information.
+ [#2642](https://github.com/lovell/sharp/issues/2642)
+
+* Re-introduce support for greyscale ICC profiles (temporarily removed in 0.30.2).
+ [#3114](https://github.com/lovell/sharp/issues/3114)
+
+* Add support for WebP and PackBits `compression` options with TIFF output.
+ [#3198](https://github.com/lovell/sharp/issues/3198)
+
+* Ensure OpenSlide and FITS input works with custom libvips.
+ [#3226](https://github.com/lovell/sharp/issues/3226)
+
+* Ensure `trim` operation is a no-op when it would reduce an image to nothing.
+ [#3223](https://github.com/lovell/sharp/issues/3223)
+
+* Expose `vips_text` to create an image containing rendered text.
+ [#3252](https://github.com/lovell/sharp/pull/3252)
+ [@brahima](https://github.com/brahima)
+
+* Ensure only properties owned by the `withMetadata` EXIF Object are parsed.
+ [#3292](https://github.com/lovell/sharp/issues/3292)
+
+* Expand `linear` operation to allow use of per-channel arrays.
+ [#3303](https://github.com/lovell/sharp/pull/3303)
+ [@antonmarsden](https://github.com/antonmarsden)
+
+* Ensure the order of `rotate`, `resize` and `extend` operations is respected where possible.
+ Emit warnings when previous calls in the same pipeline will be ignored.
+ [#3319](https://github.com/lovell/sharp/issues/3319)
+
+* Ensure PNG bitdepth can be set for non-palette output.
+ [#3322](https://github.com/lovell/sharp/issues/3322)
+
+* Add trim option to provide a specific background colour.
+ [#3332](https://github.com/lovell/sharp/pull/3332)
+ [@mart-jansink](https://github.com/mart-jansink)
+
+* Ensure resized image is unpremultiplied before composite.
+ [#3334](https://github.com/lovell/sharp/issues/3334)
diff --git a/docs/src/content/docs/changelog/v0.31.1.md b/docs/src/content/docs/changelog/v0.31.1.md
new file mode 100644
index 000000000..44467514f
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.31.1.md
@@ -0,0 +1,22 @@
+---
+title: v0.31.1 - 29th September 2022
+slug: changelog/v0.31.1
+---
+
+* Upgrade to libvips v8.13.2 for upstream bug fixes.
+
+* Ensure `close` event occurs after `end` event for Stream-based output.
+ [#3313](https://github.com/lovell/sharp/issues/3313)
+
+* Ensure `limitInputPixels` constructor option uses uint64.
+ [#3349](https://github.com/lovell/sharp/pull/3349)
+ [@marcosc90](https://github.com/marcosc90)
+
+* Ensure auto-rotation works with shrink-on-load and extract (regression in 0.31.0).
+ [#3352](https://github.com/lovell/sharp/issues/3352)
+
+* Ensure AVIF output is always 8-bit.
+ [#3358](https://github.com/lovell/sharp/issues/3358)
+
+* Ensure greyscale images can be trimmed (regression in 0.31.0).
+ [#3386](https://github.com/lovell/sharp/issues/3386)
diff --git a/docs/src/content/docs/changelog/v0.31.2.md b/docs/src/content/docs/changelog/v0.31.2.md
new file mode 100644
index 000000000..c0be292b0
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.31.2.md
@@ -0,0 +1,12 @@
+---
+title: v0.31.2 - 4th November 2022
+slug: changelog/v0.31.2
+---
+
+* Upgrade to libvips v8.13.3 for upstream bug fixes.
+
+* Ensure manual flip, rotate, resize operation ordering (regression in 0.31.1)
+ [#3391](https://github.com/lovell/sharp/issues/3391)
+
+* Ensure auto-rotation works without resize (regression in 0.31.1)
+ [#3422](https://github.com/lovell/sharp/issues/3422)
diff --git a/docs/src/content/docs/changelog/v0.31.3.md b/docs/src/content/docs/changelog/v0.31.3.md
new file mode 100644
index 000000000..84c6ac899
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.31.3.md
@@ -0,0 +1,34 @@
+---
+title: v0.31.3 - 21st December 2022
+slug: changelog/v0.31.3
+---
+
+* Add experimental support for JPEG-XL images. Requires libvips compiled with libjxl.
+ [#2731](https://github.com/lovell/sharp/issues/2731)
+
+* Add runtime detection of V8 memory cage, ensures compatibility with Electron 21 onwards.
+ [#3384](https://github.com/lovell/sharp/issues/3384)
+
+* Expose `interFrameMaxError` and `interPaletteMaxError` GIF optimisation properties.
+ [#3401](https://github.com/lovell/sharp/issues/3401)
+
+* Allow installation on Linux with glibc patch versions e.g. Fedora 38.
+ [#3423](https://github.com/lovell/sharp/issues/3423)
+
+* Expand range of existing `sharpen` parameters to match libvips.
+ [#3427](https://github.com/lovell/sharp/issues/3427)
+
+* Prevent possible race condition awaiting metadata of Stream-based input.
+ [#3451](https://github.com/lovell/sharp/issues/3451)
+
+* Improve `extractChannel` support for 16-bit output colourspaces.
+ [#3453](https://github.com/lovell/sharp/issues/3453)
+
+* Ignore `sequentialRead` option when calculating image statistics.
+ [#3462](https://github.com/lovell/sharp/issues/3462)
+
+* Small performance improvement for operations that introduce a non-opaque background.
+ [#3465](https://github.com/lovell/sharp/issues/3465)
+
+* Ensure integral output of `linear` operation.
+ [#3468](https://github.com/lovell/sharp/issues/3468)
diff --git a/docs/src/content/docs/changelog/v0.32.0.md b/docs/src/content/docs/changelog/v0.32.0.md
new file mode 100644
index 000000000..f86104bfa
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.0.md
@@ -0,0 +1,61 @@
+---
+title: v0.32.0 - 24th March 2023
+slug: changelog/v0.32.0
+---
+
+* Default to using sequential rather than random access read where possible.
+
+* Replace GIF output `optimise` / `optimize` option with `reuse`.
+
+* Add `progressive` option to GIF output for interlacing.
+
+* Add `wrap` option to text image creation.
+
+* Add `formatMagick` property to metadata of images loaded via *magick.
+
+* Prefer integer (un)premultiply for faster resizing of RGBA images.
+
+* Add `ignoreIcc` input option to ignore embedded ICC profile.
+
+* Allow use of GPS (IFD3) EXIF metadata.
+ [#2767](https://github.com/lovell/sharp/issues/2767)
+
+* TypeScript definitions are now maintained and published directly, deprecating the `@types/sharp` package.
+ [#3369](https://github.com/lovell/sharp/issues/3369)
+
+* Prebuilt binaries: ensure macOS 10.13+ support, as documented.
+ [#3438](https://github.com/lovell/sharp/issues/3438)
+
+* Prebuilt binaries: prevent use of glib slice allocator, improves QEMU support.
+ [#3448](https://github.com/lovell/sharp/issues/3448)
+
+* Add focus point coordinates to output when using attention based crop.
+ [#3470](https://github.com/lovell/sharp/pull/3470)
+ [@ejoebstl](https://github.com/ejoebstl)
+
+* Expose sharp version as `sharp.versions.sharp`.
+ [#3471](https://github.com/lovell/sharp/issues/3471)
+
+* Respect `fastShrinkOnLoad` resize option for WebP input.
+ [#3516](https://github.com/lovell/sharp/issues/3516)
+
+* Reduce sharpen `sigma` maximum from 10000 to 10.
+ [#3521](https://github.com/lovell/sharp/issues/3521)
+
+* Add support for `ArrayBuffer` input.
+ [#3548](https://github.com/lovell/sharp/pull/3548)
+ [@kapouer](https://github.com/kapouer)
+
+* Add support to `extend` operation for `extendWith` to allow copy/mirror/repeat.
+ [#3556](https://github.com/lovell/sharp/pull/3556)
+ [@janaz](https://github.com/janaz)
+
+* Ensure all async JS callbacks are wrapped to help avoid possible race condition.
+ [#3569](https://github.com/lovell/sharp/issues/3569)
+
+* Prebuilt binaries: support for tile-based output temporarily removed due to licensing issue.
+ [#3581](https://github.com/lovell/sharp/issues/3581)
+
+* Add support to `normalise` for `lower` and `upper` percentiles.
+ [#3583](https://github.com/lovell/sharp/pull/3583)
+ [@LachlanNewman](https://github.com/LachlanNewman)
diff --git a/docs/src/content/docs/changelog/v0.32.1.md b/docs/src/content/docs/changelog/v0.32.1.md
new file mode 100644
index 000000000..a73cfb93e
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.1.md
@@ -0,0 +1,30 @@
+---
+title: v0.32.1 - 27th April 2023
+slug: changelog/v0.32.1
+---
+
+* Add experimental `unflatten` operation.
+ [#3461](https://github.com/lovell/sharp/pull/3461)
+ [@antonmarsden](https://github.com/antonmarsden)
+
+* Ensure use of `flip` operation forces random access read (regression in 0.32.0).
+ [#3600](https://github.com/lovell/sharp/issues/3600)
+
+* Ensure `linear` operation works with 16-bit input (regression in 0.31.3).
+ [#3605](https://github.com/lovell/sharp/issues/3605)
+
+* Install: ensure proxy URLs are logged correctly.
+ [#3615](https://github.com/lovell/sharp/pull/3615)
+ [@TomWis97](https://github.com/TomWis97)
+
+* Ensure profile-less CMYK to CMYK roundtrip skips colourspace conversion.
+ [#3620](https://github.com/lovell/sharp/issues/3620)
+
+* Add support for `modulate` operation when using non-sRGB pipeline colourspace.
+ [#3620](https://github.com/lovell/sharp/issues/3620)
+
+* Ensure `trim` operation works with CMYK images (regression in 0.31.0).
+ [#3636](https://github.com/lovell/sharp/issues/3636)
+
+* Install: coerce libc version to semver.
+ [#3641](https://github.com/lovell/sharp/issues/3641)
diff --git a/docs/src/content/docs/changelog/v0.32.2.md b/docs/src/content/docs/changelog/v0.32.2.md
new file mode 100644
index 000000000..a14aa1410
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.2.md
@@ -0,0 +1,25 @@
+---
+title: v0.32.2 - 11th July 2023
+slug: changelog/v0.32.2
+---
+
+* Limit HEIF output dimensions to 16384x16384, matches libvips.
+
+* Ensure exceptions are not thrown when terminating.
+ [#3569](https://github.com/lovell/sharp/issues/3569)
+
+* Ensure the same access method is used for all inputs (regression in 0.32.0).
+ [#3669](https://github.com/lovell/sharp/issues/3669)
+
+* Improve detection of jp2 filename extensions.
+ [#3674](https://github.com/lovell/sharp/pull/3674)
+ [@bianjunjie1981](https://github.com/bianjunjie1981)
+
+* Guard use of smartcrop premultiplied option to prevent warning (regression in 0.32.1).
+ [#3710](https://github.com/lovell/sharp/issues/3710)
+
+* Prevent over-compute in affine-based rotate before resize.
+ [#3722](https://github.com/lovell/sharp/issues/3722)
+
+* Allow sequential read for EXIF-based auto-orientation.
+ [#3725](https://github.com/lovell/sharp/issues/3725)
diff --git a/docs/src/content/docs/changelog/v0.32.3.md b/docs/src/content/docs/changelog/v0.32.3.md
new file mode 100644
index 000000000..ac3151982
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.3.md
@@ -0,0 +1,10 @@
+---
+title: v0.32.3 - 14th July 2023
+slug: changelog/v0.32.3
+---
+
+* Expose `preset` option for WebP output.
+ [#3639](https://github.com/lovell/sharp/issues/3639)
+
+* Ensure decoding remains sequential for all operations (regression in 0.32.2).
+ [#3725](https://github.com/lovell/sharp/issues/3725)
diff --git a/docs/src/content/docs/changelog/v0.32.4.md b/docs/src/content/docs/changelog/v0.32.4.md
new file mode 100644
index 000000000..f327f8d0b
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.4.md
@@ -0,0 +1,11 @@
+---
+title: v0.32.4 - 21st July 2023
+slug: changelog/v0.32.4
+---
+
+* Upgrade to libvips v8.14.3 for upstream bug fixes.
+
+* Expose ability to (un)block low-level libvips operations by name.
+
+* Prebuilt binaries: restore support for tile-based output.
+ [#3581](https://github.com/lovell/sharp/issues/3581)
diff --git a/docs/src/content/docs/changelog/v0.32.5.md b/docs/src/content/docs/changelog/v0.32.5.md
new file mode 100644
index 000000000..3a38ec7ec
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.5.md
@@ -0,0 +1,24 @@
+---
+title: v0.32.5 - 15th August 2023
+slug: changelog/v0.32.5
+---
+
+* Upgrade to libvips v8.14.4 for upstream bug fixes.
+
+* TypeScript: Add missing `WebpPresetEnum` to definitions.
+ [#3748](https://github.com/lovell/sharp/pull/3748)
+ [@pilotso11](https://github.com/pilotso11)
+
+* Ensure compilation using musl v1.2.4.
+ [#3755](https://github.com/lovell/sharp/pull/3755)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Ensure resize with a `fit` of `inside` respects 90/270 degree rotation.
+ [#3756](https://github.com/lovell/sharp/issues/3756)
+
+* TypeScript: Ensure `minSize` property of `WebpOptions` is boolean.
+ [#3758](https://github.com/lovell/sharp/pull/3758)
+ [@sho-xizz](https://github.com/sho-xizz)
+
+* Ensure `withMetadata` adds default sRGB profile.
+ [#3761](https://github.com/lovell/sharp/issues/3761)
diff --git a/docs/src/content/docs/changelog/v0.32.6.md b/docs/src/content/docs/changelog/v0.32.6.md
new file mode 100644
index 000000000..6b7c3d431
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.32.6.md
@@ -0,0 +1,19 @@
+---
+title: v0.32.6 - 18th September 2023
+slug: changelog/v0.32.6
+---
+
+* Upgrade to libvips v8.14.5 for upstream bug fixes.
+
+* Ensure composite tile images are fully decoded (regression in 0.32.0).
+ [#3767](https://github.com/lovell/sharp/issues/3767)
+
+* Ensure `withMetadata` can add ICC profiles to RGB16 output.
+ [#3773](https://github.com/lovell/sharp/issues/3773)
+
+* Ensure `withMetadata` does not reduce 16-bit images to 8-bit (regression in 0.32.5).
+ [#3773](https://github.com/lovell/sharp/issues/3773)
+
+* TypeScript: Add definitions for block and unblock.
+ [#3799](https://github.com/lovell/sharp/pull/3799)
+ [@ldrick](https://github.com/ldrick)
diff --git a/docs/src/content/docs/changelog/v0.33.0.md b/docs/src/content/docs/changelog/v0.33.0.md
new file mode 100644
index 000000000..1ca8435de
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.0.md
@@ -0,0 +1,47 @@
+---
+title: v0.33.0 - 29th November 2023
+slug: changelog/v0.33.0
+---
+
+* Drop support for Node.js 14 and 16, now requires Node.js ^18.17.0 or >= 20.3.0
+
+* Prebuilt binaries distributed via npm registry and installed via package manager.
+
+* Building from source requires dependency on `node-addon-api`.
+
+* Remove `sharp.vendor`.
+
+* Partially deprecate `withMetadata()`, use `withExif()` and `withIccProfile()`.
+
+* Add experimental support for WebAssembly-based runtimes.
+ [@RReverser](https://github.com/RReverser)
+
+* Options for `trim` operation must be an Object, add new `lineArt` option.
+ [#2363](https://github.com/lovell/sharp/issues/2363)
+
+* Improve luminance of `tint` operation with weighting function.
+ [#3338](https://github.com/lovell/sharp/issues/3338)
+ [@jcupitt](https://github.com/jcupitt)
+
+* Ensure all `Error` objects contain a `stack` property.
+ [#3653](https://github.com/lovell/sharp/issues/3653)
+
+* Make `compression` option of `heif` mandatory to help reduce HEIF vs HEIC confusion.
+ [#3740](https://github.com/lovell/sharp/issues/3740)
+
+* Ensure correct interpretation of 16-bit raw input.
+ [#3808](https://github.com/lovell/sharp/issues/3808)
+
+* Add support for `miniswhite` when using TIFF output.
+ [#3812](https://github.com/lovell/sharp/pull/3812)
+ [@dnsbty](https://github.com/dnsbty)
+
+* TypeScript: add missing definition for `withMetadata` boolean.
+ [#3823](https://github.com/lovell/sharp/pull/3823)
+ [@uhthomas](https://github.com/uhthomas)
+
+* Add more fine-grained control over output metadata.
+ [#3824](https://github.com/lovell/sharp/issues/3824)
+
+* Ensure multi-page extract remains sequential.
+ [#3837](https://github.com/lovell/sharp/issues/3837)
diff --git a/docs/src/content/docs/changelog/v0.33.1.md b/docs/src/content/docs/changelog/v0.33.1.md
new file mode 100644
index 000000000..9a280c82f
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.1.md
@@ -0,0 +1,14 @@
+---
+title: v0.33.1 - 17th December 2023
+slug: changelog/v0.33.1
+---
+
+* Add support for Yarn Plug'n'Play filesystem layout.
+ [#3888](https://github.com/lovell/sharp/issues/3888)
+
+* Emit warning when attempting to use invalid ICC profiles.
+ [#3895](https://github.com/lovell/sharp/issues/3895)
+
+* Ensure `VIPS_NOVECTOR` environment variable is respected.
+ [#3897](https://github.com/lovell/sharp/pull/3897)
+ [@icetee](https://github.com/icetee)
diff --git a/docs/src/content/docs/changelog/v0.33.2.md b/docs/src/content/docs/changelog/v0.33.2.md
new file mode 100644
index 000000000..7d88c0adf
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.2.md
@@ -0,0 +1,16 @@
+---
+title: v0.33.2 - 12th January 2024
+slug: changelog/v0.33.2
+---
+
+* Upgrade to libvips v8.15.1 for upstream bug fixes.
+
+* TypeScript: add definition for `keepMetadata`.
+ [#3914](https://github.com/lovell/sharp/pull/3914)
+ [@abhi0498](https://github.com/abhi0498)
+
+* Ensure `extend` operation stays sequential when copying (regression in 0.32.0).
+ [#3928](https://github.com/lovell/sharp/issues/3928)
+
+* Improve error handling for unsupported multi-page rotation.
+ [#3940](https://github.com/lovell/sharp/issues/3940)
diff --git a/docs/src/content/docs/changelog/v0.33.3.md b/docs/src/content/docs/changelog/v0.33.3.md
new file mode 100644
index 000000000..17e6639fe
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.3.md
@@ -0,0 +1,21 @@
+---
+title: v0.33.3 - 23rd March 2024
+slug: changelog/v0.33.3
+---
+
+* Upgrade to libvips v8.15.2 for upstream bug fixes.
+
+* Ensure `keepIccProfile` retains P3 and CMYK input profiles.
+ [#3906](https://github.com/lovell/sharp/issues/3906)
+ [#4008](https://github.com/lovell/sharp/issues/4008)
+
+* Ensure `text.wrap` property can accept `word-char` as value.
+ [#4028](https://github.com/lovell/sharp/pull/4028)
+ [@yolopunk](https://github.com/yolopunk)
+
+* Ensure `clone` takes a deep copy of existing options.
+ [#4029](https://github.com/lovell/sharp/issues/4029)
+
+* Add `bitdepth` option to `heif` output (prebuilt binaries support 8-bit only).
+ [#4036](https://github.com/lovell/sharp/pull/4036)
+ [@mertalev](https://github.com/mertalev)
diff --git a/docs/src/content/docs/changelog/v0.33.4.md b/docs/src/content/docs/changelog/v0.33.4.md
new file mode 100644
index 000000000..9c4500f91
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.4.md
@@ -0,0 +1,32 @@
+---
+title: v0.33.4 - 16th May 2024
+slug: changelog/v0.33.4
+---
+
+* Remove experimental status from `pipelineColourspace`.
+
+* Reduce default concurrency when musl thread over-subscription detected.
+
+* TypeScript: add missing definitions for `OverlayOptions`.
+ [#4048](https://github.com/lovell/sharp/pull/4048)
+ [@ike-gg](https://github.com/ike-gg)
+
+* Install: add advanced option to force use of a globally-installed libvips.
+ [#4060](https://github.com/lovell/sharp/issues/4060)
+
+* Expose `bilinear` resizing kernel (and interpolator).
+ [#4061](https://github.com/lovell/sharp/issues/4061)
+
+* Ensure `extend` operation stays sequential for multi-page TIFF (regression in 0.32.0).
+ [#4069](https://github.com/lovell/sharp/issues/4069)
+
+* Tighten validation of constructor `text` integer properties.
+ [#4071](https://github.com/lovell/sharp/issues/4071)
+
+* Simplify internal StaySequential logic.
+ [#4074](https://github.com/lovell/sharp/pull/4074)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Ensure negate operation occurs after profile conversion.
+ [#4096](https://github.com/lovell/sharp/pull/4096)
+ [@adriaanmeuris](https://github.com/adriaanmeuris)
diff --git a/docs/src/content/docs/changelog/v0.33.5.md b/docs/src/content/docs/changelog/v0.33.5.md
new file mode 100644
index 000000000..7fb99baa2
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.33.5.md
@@ -0,0 +1,39 @@
+---
+title: v0.33.5 - 16th August 2024
+slug: changelog/v0.33.5
+---
+
+* Upgrade to libvips v8.15.3 for upstream bug fixes.
+
+* Add `pageHeight` and `pages` to response of multi-page output.
+ [#3411](https://github.com/lovell/sharp/issues/3411)
+
+* Ensure option to force use of a globally-installed libvips works correctly.
+ [#4111](https://github.com/lovell/sharp/pull/4111)
+ [@project0](https://github.com/project0)
+
+* Minimise use of `engines` property to improve yarn v1 support.
+ [#4130](https://github.com/lovell/sharp/issues/4130)
+
+* Ensure `sharp.format.heif` includes only AVIF when using prebuilt binaries.
+ [#4132](https://github.com/lovell/sharp/issues/4132)
+
+* Add support to recomb operation for 4x4 matrices.
+ [#4147](https://github.com/lovell/sharp/pull/4147)
+ [@ton11797](https://github.com/ton11797)
+
+* Expose PNG text chunks as `comments` metadata.
+ [#4157](https://github.com/lovell/sharp/pull/4157)
+ [@nkeynes](https://github.com/nkeynes)
+
+* Expose optional `precision` and `minAmplitude` parameters of `blur` operation.
+ [#4168](https://github.com/lovell/sharp/pull/4168)
+ [#4172](https://github.com/lovell/sharp/pull/4172)
+ [@marcosc90](https://github.com/marcosc90)
+
+* Ensure `keepIccProfile` avoids colour transformation where possible.
+ [#4186](https://github.com/lovell/sharp/issues/4186)
+
+* TypeScript: `chromaSubsampling` metadata is optional.
+ [#4191](https://github.com/lovell/sharp/pull/4191)
+ [@DavidVaness](https://github.com/DavidVaness)
diff --git a/docs/src/content/docs/changelog/v0.34.0.md b/docs/src/content/docs/changelog/v0.34.0.md
new file mode 100644
index 000000000..4fc83109e
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.0.md
@@ -0,0 +1,52 @@
+---
+title: v0.34.0 - 4th April 2025
+slug: changelog/v0.34.0
+---
+
+* Breaking: Support array of input images to be joined or animated.
+ [#1580](https://github.com/lovell/sharp/issues/1580)
+
+* Breaking: Ensure `removeAlpha` removes all alpha channels.
+ [#2266](https://github.com/lovell/sharp/issues/2266)
+
+* Breaking: Non-animated GIF output defaults to no-loop instead of loop-forever.
+ [#3394](https://github.com/lovell/sharp/issues/3394)
+
+* Breaking: Support `info.size` on wide-character systems via upgrade to C++17.
+ [#3943](https://github.com/lovell/sharp/issues/3943)
+
+* Breaking: Ensure `background` metadata can be parsed by `color` package.
+ [#4090](https://github.com/lovell/sharp/issues/4090)
+
+* Add `isPalette` and `bitsPerSample` to metadata, deprecate `paletteBitDepth`.
+
+* Expose WebP `smartDeblock` output option.
+
+* Prevent use of linux-x64 binaries with v1 microarchitecture.
+
+* Add `autoOrient` operation and constructor option.
+ [#4151](https://github.com/lovell/sharp/pull/4151)
+ [@happycollision](https://github.com/happycollision)
+
+* TypeScript: Ensure channel counts use the correct range.
+ [#4197](https://github.com/lovell/sharp/pull/4197)
+ [@DavidVaness](https://github.com/DavidVaness)
+
+* Improve support for ppc64le architecture.
+ [#4203](https://github.com/lovell/sharp/pull/4203)
+ [@sumitd2](https://github.com/sumitd2)
+
+* Add `pdfBackground` constructor property.
+ [#4207](https://github.com/lovell/sharp/pull/4207)
+ [@calebmer](https://github.com/calebmer)
+
+* Expose erode and dilate operations.
+ [#4243](https://github.com/lovell/sharp/pull/4243)
+ [@qpincon](https://github.com/qpincon)
+
+* Add support for RGBE images. Requires libvips compiled with radiance support.
+ [#4316](https://github.com/lovell/sharp/pull/4316)
+ [@florentzabera](https://github.com/florentzabera)
+
+* Allow wide-gamut HEIF output at higher bitdepths.
+ [#4344](https://github.com/lovell/sharp/issues/4344)
diff --git a/docs/src/content/docs/changelog/v0.34.1.md b/docs/src/content/docs/changelog/v0.34.1.md
new file mode 100644
index 000000000..a5ae94dcf
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.1.md
@@ -0,0 +1,8 @@
+---
+title: v0.34.1 - 7th April 2025
+slug: changelog/v0.34.1
+---
+
+* TypeScript: Ensure new `autoOrient` property is optional.
+ [#4362](https://github.com/lovell/sharp/pull/4362)
+ [@styfle](https://github.com/styfle)
diff --git a/docs/src/content/docs/changelog/v0.34.2.md b/docs/src/content/docs/changelog/v0.34.2.md
new file mode 100644
index 000000000..2292304ea
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.2.md
@@ -0,0 +1,28 @@
+---
+title: v0.34.2 - 20th May 2025
+slug: changelog/v0.34.2
+---
+
+* Ensure animated GIF to WebP conversion retains loop (regression in 0.34.0).
+ [#3394](https://github.com/lovell/sharp/issues/3394)
+
+* Ensure `pdfBackground` constructor property is used.
+ [#4207](https://github.com/lovell/sharp/pull/4207)
+ [#4398](https://github.com/lovell/sharp/issues/4398)
+
+* Add experimental support for prebuilt Windows ARM64 binaries.
+ [#4375](https://github.com/lovell/sharp/pull/4375)
+ [@hans00](https://github.com/hans00)
+
+* Ensure resizing with a `fit` of `contain` supports multiple alpha channels.
+ [#4382](https://github.com/lovell/sharp/issues/4382)
+
+* TypeScript: Ensure `metadata` response more closely matches reality.
+ [#4383](https://github.com/lovell/sharp/issues/4383)
+
+* TypeScript: Ensure `smartDeblock` property is included in WebP definition.
+ [#4387](https://github.com/lovell/sharp/pull/4387)
+ [@Stephen-X](https://github.com/Stephen-X)
+
+* Ensure support for wide-character filenames on Windows (regression in 0.34.0).
+ [#4391](https://github.com/lovell/sharp/issues/4391)
diff --git a/docs/src/content/docs/changelog/v0.34.3.md b/docs/src/content/docs/changelog/v0.34.3.md
new file mode 100644
index 000000000..1f3016741
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.3.md
@@ -0,0 +1,33 @@
+---
+title: v0.34.3 - 10th July 2025
+slug: changelog/v0.34.3
+---
+
+* Upgrade to libvips v8.17.1 for upstream bug fixes.
+
+* Add "Magic Kernel Sharp" (no relation) to resizing kernels.
+
+* Deprecate top-level, format-specific constructor parameters, e.g. `subifd` becomes `tiff.subifd`.
+
+* Expose `stylesheet` and `highBitdepth` SVG input parameters.
+
+* Expose `keepDuplicateFrames` GIF output parameter.
+
+* Add support for RAW digital camera image input. Requires libvips compiled with libraw support.
+
+* Provide XMP metadata as a string, as well as a Buffer, where possible.
+
+* Add `pageHeight` option to `create` and `raw` input for animated images.
+ [#3236](https://github.com/lovell/sharp/issues/3236)
+
+* Expose JPEG 2000 `oneshot` decoder option.
+ [#4262](https://github.com/lovell/sharp/pull/4262)
+ [@mbklein](https://github.com/mbklein)
+
+* Support composite operation with non-sRGB pipeline colourspace.
+ [#4412](https://github.com/lovell/sharp/pull/4412)
+ [@kleisauke](https://github.com/kleisauke)
+
+* Add `keepXmp` and `withXmp` for control over output XMP metadata.
+ [#4416](https://github.com/lovell/sharp/pull/4416)
+ [@tpatel](https://github.com/tpatel)
diff --git a/docs/src/content/docs/changelog/v0.34.4.md b/docs/src/content/docs/changelog/v0.34.4.md
new file mode 100644
index 000000000..83c95ce43
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.4.md
@@ -0,0 +1,28 @@
+---
+title: v0.34.4 - 17th September 2025
+slug: changelog/v0.34.4
+---
+
+* Upgrade to libvips v8.17.2 for upstream bug fixes.
+
+* Ensure TIFF `subifd` and OpenSlide `level` input options are respected (regression in 0.34.3).
+
+* Ensure `autoOrient` occurs before non-90 angle rotation.
+ [#4425](https://github.com/lovell/sharp/issues/4425)
+
+* Ensure `autoOrient` removes existing metadata after shrink-on-load.
+ [#4431](https://github.com/lovell/sharp/issues/4431)
+
+* TypeScript: Ensure `KernelEnum` includes `linear`.
+ [#4441](https://github.com/lovell/sharp/pull/4441)
+ [@BayanBennett](https://github.com/BayanBennett)
+
+* Ensure `unlimited` flag is passed upstream when reading TIFF images.
+ [#4446](https://github.com/lovell/sharp/issues/4446)
+
+* Support Electron memory cage when reading XMP metadata (regression in 0.34.3).
+ [#4451](https://github.com/lovell/sharp/issues/4451)
+
+* Add sharp-libvips rpath for yarn v5 support.
+ [#4452](https://github.com/lovell/sharp/pull/4452)
+ [@arcanis](https://github.com/arcanis)
diff --git a/docs/src/content/docs/changelog/v0.34.5.md b/docs/src/content/docs/changelog/v0.34.5.md
new file mode 100644
index 000000000..d8321baa4
--- /dev/null
+++ b/docs/src/content/docs/changelog/v0.34.5.md
@@ -0,0 +1,21 @@
+---
+title: v0.34.5 - 6th November 2025
+slug: changelog/v0.34.5
+---
+
+* Upgrade to libvips v8.17.3 for upstream bug fixes.
+
+* Add experimental support for prebuilt Linux RISC-V 64-bit binaries.
+
+* Support building from source with npm v12+, deprecate `--build-from-source` flag.
+ [#4458](https://github.com/lovell/sharp/issues/4458)
+
+* Add support for BigTIFF output.
+ [#4459](https://github.com/lovell/sharp/pull/4459)
+ [@throwbi](https://github.com/throwbi)
+
+* Improve error messaging when only warnings issued.
+ [#4465](https://github.com/lovell/sharp/issues/4465)
+
+* Simplify ICC processing when retaining input profiles.
+ [#4468](https://github.com/lovell/sharp/issues/4468)
diff --git a/docs/src/content/docs/index.md b/docs/src/content/docs/index.md
index 4c04edd88..3ba704f43 100644
--- a/docs/src/content/docs/index.md
+++ b/docs/src/content/docs/index.md
@@ -25,7 +25,7 @@ rotation, extraction, compositing and gamma correction are available.
Most modern macOS, Windows and Linux systems
do not require any additional install or runtime dependencies.
-```sh
+```sh frame="none"
npm install sharp
```
diff --git a/docs/src/content/docs/install.md b/docs/src/content/docs/install.md
index 69d1c1064..083db5ccd 100644
--- a/docs/src/content/docs/install.md
+++ b/docs/src/content/docs/install.md
@@ -12,28 +12,29 @@ If a package manager lockfile must support multiple platforms,
please see the [cross-platform](#cross-platform) section
to help decide which package manager is appropriate.
-```sh
+```sh frame="none"
npm install sharp
```
-```sh
+```sh frame="none"
pnpm add sharp
```
-When using `pnpm`, you may need to add `sharp` to
+When using `pnpm`, add `sharp` to
[ignoredBuiltDependencies](https://pnpm.io/settings#ignoredbuiltdependencies)
to silence warnings.
-```sh
+```sh frame="none"
yarn add sharp
```
-```sh
+```sh frame="none"
bun add sharp
```
-```sh
-deno run --allow-ffi ...
+```sh frame="none"
+deno add --quiet npm:sharp
+deno run --allow-env --allow-ffi --allow-read --allow-sys ...
```
## Prerequisites
@@ -48,8 +49,9 @@ Ready-compiled sharp and libvips binaries are provided for use on the most commo
* macOS ARM64
* Linux ARM (glibc >= 2.31)
* Linux ARM64 (glibc >= 2.26, musl >= 1.2.2)
-* Linux ppc64 (glibc >= 2.31)
-* Linux s390x (glibc >= 2.31)
+* Linux RISC-V 64-bit (glibc >= 2.41)
+* Linux ppc64 (glibc >= 2.36)
+* Linux s390x (glibc >= 2.36)
* Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2)
* Windows x64
* Windows x86
@@ -75,7 +77,7 @@ npm `package-lock.json` files shared by multiple platforms can cause installatio
Provides limited support via `--os`, `--cpu` and `--libc` flags.
To support macOS with Intel x64 and ARM64 CPUs:
-```sh
+```sh frame="none"
npm install --cpu=x64 --os=darwin sharp
npm install --cpu=arm64 --os=darwin sharp
```
@@ -83,7 +85,7 @@ npm install --cpu=arm64 --os=darwin sharp
When the cross-target is Linux, the C standard library must be specified.
To support glibc (e.g. Debian) and musl (e.g. Alpine) Linux with Intel x64 CPUs:
-```sh
+```sh frame="none"
npm install --cpu=x64 --os=linux --libc=glibc sharp
npm install --cpu=x64 --os=linux --libc=musl sharp
```
@@ -110,10 +112,11 @@ and on macOS when running Node.js under Rosetta.
## Building from source
-This module will be compiled from source at `npm install` time when:
+This module will be compiled from source when:
* a globally-installed libvips is detected, or
-* when the `npm install --build-from-source` flag is used.
+* using `npm explore sharp -- npm run build`, or
+* using the deprecated `npm run --build-from-source` at `npm install` time.
The logic to detect a globally-installed libvips can be skipped by setting the
`SHARP_IGNORE_GLOBAL_LIBVIPS` (never try to use it) or
@@ -129,7 +132,7 @@ Building from source requires:
There is an install-time check for these dependencies.
If `node-addon-api` or `node-gyp` cannot be found, try adding them via:
-```sh
+```sh frame="none"
npm install --save node-addon-api node-gyp
```
@@ -152,19 +155,20 @@ Native text rendering is unsupported.
[Tile-based output](/api-output#tile) is unsupported.
-```sh
+```sh frame="none"
npm install --cpu=wasm32 sharp
```
## FreeBSD
-The `vips` package must be installed before `npm install` is run.
+The `vips` package must be installed before `npm install` is run,
+as well as the additional [building from source](#building-from-source) dependencies.
-```sh
+```sh frame="none"
pkg install -y pkgconf vips
```
-```sh
+```sh frame="none"
cd /usr/ports/graphics/vips/ && make install clean
```
@@ -175,7 +179,7 @@ The default memory allocator on most glibc-based Linux systems
processes that involve lots of small memory allocations.
For this reason, by default, sharp will limit the use of thread-based
-[concurrency](api-utility#concurrency) when the glibc allocator is
+[concurrency](/api-utility#concurrency) when the glibc allocator is
detected at runtime.
To help avoid fragmentation and improve performance on these systems,
@@ -213,7 +217,7 @@ Ensure sharp is excluded from bundling via the
[externals](https://webpack.js.org/configuration/externals/)
configuration.
-```js
+```js frame="none"
externals: {
'sharp': 'commonjs sharp'
}
@@ -225,7 +229,7 @@ Ensure sharp is excluded from bundling via the
[external](https://esbuild.github.io/api/#external)
configuration.
-```js
+```js frame="none"
buildSync({
entryPoints: ['app.js'],
bundle: true,
@@ -234,14 +238,14 @@ buildSync({
})
```
-```sh
+```sh frame="none"
esbuild app.js --bundle --platform=node --external:sharp
```
For `serverless-esbuild`, ensure platform-specific binaries are installed
via the `serverless.yml` configuration.
-```yaml
+```yaml frame="none"
custom:
esbuild:
external:
@@ -259,7 +263,7 @@ Ensure `sharp` is unpacked from the ASAR archive file using the
[asarUnpack](https://www.electron.build/app-builder-lib.interface.platformspecificbuildoptions#asarunpack)
option.
-```json
+```json frame="none"
{
"build": {
"asar": true,
@@ -277,7 +281,7 @@ Ensure `sharp` is unpacked from the ASAR archive file using the
[unpack](https://js.electronforge.io/interfaces/_electron_forge_maker_squirrel.InternalOptions.Options.html#asar)
option.
-```json
+```json frame="none"
{
"packagerConfig": {
"asar": {
@@ -297,7 +301,7 @@ Ensure `sharp` is excluded from bundling via the
[build.rollupOptions](https://vitejs.dev/config/build-options.html)
configuration.
-```js
+```js frame="none"
import { defineConfig } from 'vite';
export default defineConfig({
diff --git a/docs/src/content/docs/performance.md b/docs/src/content/docs/performance.md
index e61cfd6f8..19aead63d 100644
--- a/docs/src/content/docs/performance.md
+++ b/docs/src/content/docs/performance.md
@@ -2,6 +2,39 @@
title: Performance
---
+## Parallelism and concurrency
+
+Node.js uses a libuv-managed thread pool when processing asynchronous calls to native modules such as sharp.
+
+The maximum number of images that sharp can process in parallel is controlled by libuv's
+[`UV_THREADPOOL_SIZE`](https://nodejs.org/api/cli.html#uv_threadpool_sizesize)
+environment variable, which defaults to 4.
+
+When using more than 4 physical CPU cores, set this environment variable
+before the Node.js process starts to increase the thread pool size.
+
+```sh frame="none"
+export UV_THREADPOOL_SIZE="$(lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l)"
+```
+
+libvips uses a shared thread pool to avoid the overhead of spawning new threads.
+The size of this thread pool will grow on demand and shrink when idle.
+
+The default number of threads used to concurrently process each image is the same as the number of CPU cores,
+except when using glibc-based Linux without jemalloc, where the default is `1` to help reduce memory fragmentation.
+
+Use [`sharp.concurrency()`](/api-utility/#concurrency) to manage the number of threads per image.
+
+To reduce memory fragmentation when using the default Linux glibc memory allocator, set the
+[`MALLOC_ARENA_MAX`](https://sourceware.org/glibc/manual/latest/html_node/Memory-Allocation-Tunables.html)
+environment variable before the Node.js process starts to reduce the number of memory pools.
+
+```sh frame="none"
+export MALLOC_ARENA_MAX="2"
+```
+
+## Benchmark
+
A test to benchmark the performance of this module relative to alternatives.
Greater libvips performance can be expected with caching enabled (default)
@@ -9,28 +42,28 @@ and using 8+ core machines, especially those with larger L1/L2 CPU caches.
The I/O limits of the relevant (de)compression library will generally determine maximum throughput.
-## Contenders
+### Contenders
-* [jimp](https://www.npmjs.com/package/jimp) v1.6.0 - Image processing in pure JavaScript.
-* [imagemagick](https://www.npmjs.com/package/imagemagick) v0.1.3 - Supports filesystem only and "*has been unmaintained for a long time*".
-* [gm](https://www.npmjs.com/package/gm) v1.25.1 - Fully featured wrapper around GraphicsMagick's `gm` command line utility, but "*has been sunset*".
-* sharp v0.34.0 / libvips v8.16.1 - Caching within libvips disabled to ensure a fair comparison.
+- [jimp](https://www.npmjs.com/package/jimp) v1.6.0 - Image processing in pure JavaScript.
+- [imagemagick](https://www.npmjs.com/package/imagemagick) v0.1.3 - Supports filesystem only and "_has been unmaintained for a long time_".
+- [gm](https://www.npmjs.com/package/gm) v1.25.1 - Fully featured wrapper around GraphicsMagick's `gm` command line utility, but "_has been sunset_".
+- sharp v0.34.3 / libvips v8.17.0 - Caching within libvips disabled to ensure a fair comparison.
-## Environment
+### Environment
-### AMD64
+#### AMD64
-* AWS EC2 us-west-2 [c7a.xlarge](https://aws.amazon.com/ec2/instance-types/c7a/) (4x AMD EPYC 9R14)
-* Ubuntu 24.10 [fad5ba7223f8](https://hub.docker.com/layers/library/ubuntu/24.10/images/sha256-fad5ba7223f8d87179dfa23211d31845d47e07a474ac31ad5258afb606523c0d)
-* Node.js 22.14.0
+- AWS EC2 us-west-2 [c7a.xlarge](https://aws.amazon.com/ec2/instance-types/c7a/) (4x AMD EPYC 9R14)
+- Ubuntu 25.04
+- Node.js 24.3.0
-### ARM64
+#### ARM64
-* AWS EC2 us-west-2 [c8g.xlarge](https://aws.amazon.com/ec2/instance-types/c8g/) (4x ARM Graviton4)
-* Ubuntu 24.10 [133f2e05cb69](https://hub.docker.com/layers/library/ubuntu/24.10/images/sha256-133f2e05cb6958c3ce7ec870fd5a864558ba780fb7062315b51a23670bff7e76)
-* Node.js 22.14.0
+- AWS EC2 us-west-2 [c8g.xlarge](https://aws.amazon.com/ec2/instance-types/c8g/) (4x ARM Graviton4)
+- Ubuntu 25.04
+- Node.js 24.3.0
-## Task: JPEG
+### Task: JPEG
Decompress a 2725x2225 JPEG image,
resize to 720x588 using Lanczos 3 resampling (where available),
@@ -40,29 +73,31 @@ Note: jimp does not support Lanczos 3, bicubic resampling used instead.
#### Results: JPEG (AMD64)
-| Module | Input | Output | Ops/sec | Speed-up |
-| :----------------- | :----- | :----- | ------: | -------: |
-| jimp | buffer | buffer | 2.35 | 1.0 |
-| imagemagick | file | file | 10.51 | 4.5 |
-| gm | buffer | buffer | 11.67 | 5.0 |
-| gm | file | file | 11.75 | 5.1 |
-| sharp | stream | stream | 60.72 | 25.8 |
-| sharp | file | file | 62.37 | 26.5 |
-| sharp | buffer | buffer | 65.15 | 27.7 |
+| Package | I/O | Ops/sec | Speed-up |
+| :---------- | :----- | ------: | -------: |
+| jimp | buffer | 2.40 | 1.0 |
+| jimp | file | 2.60 | 1.1 |
+| imagemagick | file | 9.70 | 4.0 |
+| gm | buffer | 11.60 | 4.8 |
+| gm | file | 11.72 | 4.9 |
+| sharp | stream | 59.40 | 24.8 |
+| sharp | file | 62.67 | 26.1 |
+| sharp | buffer | 64.42 | 26.8 |
#### Results: JPEG (ARM64)
-| Module | Input | Output | Ops/sec | Speed-up |
-| :----------------- | :----- | :----- | ------: | -------: |
-| jimp | buffer | buffer | 2.13 | 1.0 |
-| imagemagick | file | file | 12.95 | 6.1 |
-| gm | buffer | buffer | 13.53 | 6.4 |
-| gm | file | file | 13.52 | 6.4 |
-| sharp | stream | stream | 46.58 | 21.9 |
-| sharp | file | file | 48.42 | 22.7 |
-| sharp | buffer | buffer | 50.16 | 23.6 |
+| Package | I/O | Ops/sec | Speed-up |
+| :---------- | :----- | ------: | -------: |
+| jimp | buffer | 2.24 | 1.0 |
+| jimp | file | 2.47 | 1.1 |
+| imagemagick | file | 10.42 | 4.7 |
+| gm | buffer | 12.80 | 5.7 |
+| gm | file | 12.88 | 5.7 |
+| sharp | stream | 45.58 | 20.3 |
+| sharp | file | 47.99 | 21.4 |
+| sharp | buffer | 49.20 | 22.0 |
-## Task: PNG
+### Task: PNG
Decompress a 2048x1536 RGBA PNG image,
premultiply the alpha channel,
@@ -72,31 +107,31 @@ and without adaptive filtering.
Note: jimp does not support premultiply/unpremultiply.
-### Results: PNG (AMD64)
+#### Results: PNG (AMD64)
-| Module | Input | Output | Ops/sec | Speed-up |
-| :----------------- | :----- | :----- | ------: | -------: |
-| gm | file | file | 8.66 | 1.0 |
-| imagemagick | file | file | 8.79 | 1.0 |
-| jimp | buffer | buffer | 11.26 | 1.3 |
-| sharp | file | file | 27.93 | 3.2 |
-| sharp | buffer | buffer | 28.69 | 3.3 |
+| Package | I/O | Ops/sec | Speed-up |
+| :---------- | :----- | ------: | -------: |
+| imagemagick | file | 6.06 | 1.0 |
+| gm | file | 8.44 | 1.4 |
+| jimp | buffer | 10.98 | 1.8 |
+| sharp | file | 28.26 | 4.7 |
+| sharp | buffer | 28.70 | 4.7 |
-### Results: PNG (ARM64)
+#### Results: PNG (ARM64)
-| Module | Input | Output | Ops/sec | Speed-up |
-| :----------------- | :----- | :----- | ------: | -------: |
-| gm | file | file | 9.65 | 1.0 |
-| imagemagick | file | file | 9.72 | 1.0 |
-| jimp | buffer | buffer | 10.68 | 1.1 |
-| sharp | file | file | 23.90 | 2.5 |
-| sharp | buffer | buffer | 24.48 | 2.5 |
+| Package | I/O | Ops/sec | Speed-up |
+| :---------- | :----- | ------: | -------: |
+| imagemagick | file | 7.09 | 1.0 |
+| gm | file | 8.93 | 1.3 |
+| jimp | buffer | 10.28 | 1.5 |
+| sharp | file | 23.81 | 3.4 |
+| sharp | buffer | 24.19 | 3.4 |
## Running the benchmark test
Requires Docker.
-```sh
+```sh frame="none"
git clone https://github.com/lovell/sharp.git
cd sharp/test/bench
./run-with-docker.sh
diff --git a/install/build.js b/install/build.js
new file mode 100644
index 000000000..2ca224586
--- /dev/null
+++ b/install/build.js
@@ -0,0 +1,38 @@
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
+
+const {
+ useGlobalLibvips,
+ globalLibvipsVersion,
+ log,
+ spawnRebuild,
+} = require('../lib/libvips');
+
+log('Attempting to build from source via node-gyp');
+log('See https://sharp.pixelplumbing.com/install#building-from-source');
+
+try {
+ const addonApi = require('node-addon-api');
+ log(`Found node-addon-api ${addonApi.version || ''}`);
+} catch (_err) {
+ log('Please add node-addon-api to your dependencies');
+ process.exit(1);
+}
+try {
+ const gyp = require('node-gyp');
+ log(`Found node-gyp ${gyp().version}`);
+} catch (_err) {
+ log('Please add node-gyp to your dependencies');
+ process.exit(1);
+}
+
+if (useGlobalLibvips(log)) {
+ log(`Detected globally-installed libvips v${globalLibvipsVersion()}`);
+}
+
+const status = spawnRebuild();
+if (status !== 0) {
+ process.exit(status);
+}
diff --git a/install/check.js b/install/check.js
index 0e00133ab..1cfb7d32e 100644
--- a/install/check.js
+++ b/install/check.js
@@ -1,39 +1,12 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
try {
- const { useGlobalLibvips, globalLibvipsVersion, log, spawnRebuild } = require('../lib/libvips');
-
- const buildFromSource = (msg) => {
- log(msg);
- log('Attempting to build from source via node-gyp');
- try {
- const addonApi = require('node-addon-api');
- log(`Found node-addon-api ${addonApi.version || ''}`);
- } catch (err) {
- log('Please add node-addon-api to your dependencies');
- return;
- }
- try {
- const gyp = require('node-gyp');
- log(`Found node-gyp ${gyp().version}`);
- } catch (err) {
- log('Please add node-gyp to your dependencies');
- return;
- }
- log('See https://sharp.pixelplumbing.com/install#building-from-source');
- const status = spawnRebuild();
- if (status !== 0) {
- process.exit(status);
- }
- };
-
- if (useGlobalLibvips(log)) {
- buildFromSource(`Detected globally-installed libvips v${globalLibvipsVersion()}`);
- } else if (process.env.npm_config_build_from_source) {
- buildFromSource('Detected --build-from-source flag');
+ const { useGlobalLibvips } = require('../lib/libvips');
+ if (useGlobalLibvips() || process.env.npm_config_build_from_source) {
+ process.exit(1);
}
} catch (err) {
const summary = err.message.split(/\n/).slice(0, 1);
diff --git a/lib/channel.js b/lib/channel.js
index 46bce3d57..3c6c0b439 100644
--- a/lib/channel.js
+++ b/lib/channel.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const is = require('./is');
@@ -18,7 +18,7 @@ const bool = {
/**
* Remove alpha channels, if any. This is a no-op if the image does not have an alpha channel.
*
- * See also {@link /api-operation#flatten|flatten}.
+ * See also {@link /api-operation/#flatten flatten}.
*
* @example
* sharp('rgba.png')
@@ -74,6 +74,8 @@ function ensureAlpha (alpha) {
/**
* Extract a single channel from a multi-channel image.
*
+ * The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
+ *
* @example
* // green.jpg is a greyscale image containing the green channel of the input
* await sharp(input)
@@ -161,7 +163,7 @@ function bandbool (boolOp) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
// Public instance functions
removeAlpha,
diff --git a/lib/colour.js b/lib/colour.js
index ad283830e..e61c248a8 100644
--- a/lib/colour.js
+++ b/lib/colour.js
@@ -1,9 +1,9 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
-'use strict';
-
-const color = require('color');
+const color = require('@img/colour');
const is = require('./is');
/**
@@ -69,7 +69,7 @@ function grayscale (grayscale) {
*
* The input image will be converted to the provided colourspace at the start of the pipeline.
* All operations will use this colourspace before converting to the output colourspace,
- * as defined by {@link #tocolourspace|toColourspace}.
+ * as defined by {@link #tocolourspace toColourspace}.
*
* @since 0.29.0
*
@@ -80,7 +80,7 @@ function grayscale (grayscale) {
* .toColourspace('srgb')
* .toFile('16bpc-pipeline-to-8bpc-output.png')
*
- * @param {string} [colourspace] - pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://github.com/libvips/libvips/blob/41cff4e9d0838498487a00623462204eb10ee5b8/libvips/iofuncs/enumtypes.c#L774)
+ * @param {string} [colourspace] - pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
@@ -112,7 +112,7 @@ function pipelineColorspace (colorspace) {
* .toColourspace('rgb16')
* .toFile('16-bpp.png')
*
- * @param {string} [colourspace] - output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/3c0bfdf74ce1dc37a6429bed47fa76f16e2cd70a/libvips/iofuncs/enumtypes.c#L777-L794)
+ * @param {string} [colourspace] - output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
@@ -141,7 +141,10 @@ function toColorspace (colorspace) {
* @throws {Error} Invalid value
*/
function _getBackgroundColourOption (value) {
- if (is.object(value) || is.string(value)) {
+ if (
+ is.object(value) ||
+ (is.string(value) && value.length >= 3 && value.length <= 200)
+ ) {
const colour = color(value);
return [
colour.red(),
@@ -172,7 +175,7 @@ function _setBackgroundColourOption (key, value) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
// Public
tint,
diff --git a/lib/composite.js b/lib/composite.js
index 98f8aefef..1c3e5e629 100644
--- a/lib/composite.js
+++ b/lib/composite.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const is = require('./is');
@@ -56,7 +56,7 @@ const blend = {
* `hard-light`, `soft-light`, `difference`, `exclusion`.
*
* More information about blend modes can be found at
- * https://www.libvips.org/API/current/libvips-conversion.html#VipsBlendMode
+ * https://www.libvips.org/API/current/enum.BlendMode.html
* and https://www.cairographics.org/operators/
*
* @since 0.22.0
@@ -123,8 +123,8 @@ const blend = {
* @param {Number} [images[].raw.height]
* @param {Number} [images[].raw.channels]
* @param {boolean} [images[].animated=false] - Set to `true` to read all frames/pages of an animated image.
- * @param {string} [images[].failOn='warning'] - @see {@link /api-constructor#parameters|constructor parameters}
- * @param {number|boolean} [images[].limitInputPixels=268402689] - @see {@link /api-constructor#parameters|constructor parameters}
+ * @param {string} [images[].failOn='warning'] - @see {@link /api-constructor/ constructor parameters}
+ * @param {number|boolean} [images[].limitInputPixels=268402689] - @see {@link /api-constructor/ constructor parameters}
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
@@ -206,7 +206,7 @@ function composite (images) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Sharp.prototype.composite = composite;
Sharp.blend = blend;
};
diff --git a/lib/constructor.js b/lib/constructor.js
index d94900683..9aac8105c 100644
--- a/lib/constructor.js
+++ b/lib/constructor.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const util = require('node:util');
const stream = require('node:stream');
@@ -12,6 +12,10 @@ require('./sharp');
// Use NODE_DEBUG=sharp to enable libvips warnings
const debuglog = util.debuglog('sharp');
+const queueListener = (queueLength) => {
+ Sharp.queue.emit('change', queueLength);
+};
+
/**
* Constructor factory to create an instance of `sharp`, to which further methods are chained.
*
@@ -153,9 +157,6 @@ const debuglog = util.debuglog('sharp');
* @param {number} [options.ignoreIcc=false] - should the embedded ICC profile, if any, be ignored.
* @param {number} [options.pages=1] - Number of pages to extract for multi-page input (GIF, WebP, TIFF), use -1 for all pages.
* @param {number} [options.page=0] - Page number to start extracting from for multi-page input (GIF, WebP, TIFF), zero based.
- * @param {number} [options.subifd=-1] - subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image.
- * @param {number} [options.level=0] - level to extract from a multi-level input (OpenSlide), zero based.
- * @param {string|Object} [options.pdfBackground] - Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick.
* @param {boolean} [options.animated=false] - Set to `true` to read all frames/pages of an animated image (GIF, WebP, TIFF), equivalent of setting `pages` to `-1`.
* @param {Object} [options.raw] - describes raw pixel input image data. See `raw()` for pixel ordering.
* @param {number} [options.raw.width] - integral number of pixels wide.
@@ -163,15 +164,17 @@ const debuglog = util.debuglog('sharp');
* @param {number} [options.raw.channels] - integral number of channels, between 1 and 4.
* @param {boolean} [options.raw.premultiplied] - specifies that the raw input has already been premultiplied, set to `true`
* to avoid sharp premultiplying the image. (optional, default `false`)
+ * @param {number} [options.raw.pageHeight] - The pixel height of each page/frame for animated images, must be an integral factor of `raw.height`.
* @param {Object} [options.create] - describes a new image to be created.
* @param {number} [options.create.width] - integral number of pixels wide.
* @param {number} [options.create.height] - integral number of pixels high.
* @param {number} [options.create.channels] - integral number of channels, either 3 (RGB) or 4 (RGBA).
* @param {string|Object} [options.create.background] - parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
+ * @param {number} [options.create.pageHeight] - The pixel height of each page/frame for animated images, must be an integral factor of `create.height`.
* @param {Object} [options.create.noise] - describes a noise to be created.
* @param {string} [options.create.noise.type] - type of generated noise, currently only `gaussian` is supported.
- * @param {number} [options.create.noise.mean] - mean of pixels in generated noise.
- * @param {number} [options.create.noise.sigma] - standard deviation of pixels in generated noise.
+ * @param {number} [options.create.noise.mean=128] - Mean value of pixels in the generated noise.
+ * @param {number} [options.create.noise.sigma=30] - Standard deviation of pixel values in the generated noise.
* @param {Object} [options.text] - describes a new text image to be created.
* @param {string} [options.text.text] - text to render as a UTF-8 string. It can contain Pango markup, for example `LeMonde`.
* @param {string} [options.text.font] - font name to render with.
@@ -191,11 +194,22 @@ const debuglog = util.debuglog('sharp');
* @param {string|Object} [options.join.background] - parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
* @param {string} [options.join.halign='left'] - horizontal alignment style for images joined horizontally (`'left'`, `'centre'`, `'center'`, `'right'`).
* @param {string} [options.join.valign='top'] - vertical alignment style for images joined vertically (`'top'`, `'centre'`, `'center'`, `'bottom'`).
- *
+ * @param {Object} [options.tiff] - Describes TIFF specific options.
+ * @param {number} [options.tiff.subifd=-1] - Sub Image File Directory to extract for OME-TIFF, defaults to main image.
+ * @param {Object} [options.svg] - Describes SVG specific options.
+ * @param {string} [options.svg.stylesheet] - Custom CSS for SVG input, applied with a User Origin during the CSS cascade.
+ * @param {boolean} [options.svg.highBitdepth=false] - Set to `true` to render SVG input at 32-bits per channel (128-bit) instead of 8-bits per channel (32-bit) RGBA.
+ * @param {Object} [options.pdf] - Describes PDF specific options. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick.
+ * @param {string|Object} [options.pdf.background] - Background colour to use when PDF is partially transparent. Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
+ * @param {Object} [options.openSlide] - Describes OpenSlide specific options. Requires the use of a globally-installed libvips compiled with support for OpenSlide.
+ * @param {number} [options.openSlide.level=0] - Level to extract from a multi-level input, zero based.
+ * @param {Object} [options.jp2] - Describes JPEG 2000 specific options. Requires the use of a globally-installed libvips compiled with support for OpenJPEG.
+ * @param {boolean} [options.jp2.oneshot=false] - Set to `true` to decode tiled JPEG 2000 images in a single operation, improving compatibility.
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
const Sharp = function (input, options) {
+ // biome-ignore lint/complexity/noArguments: constructor factory
if (arguments.length === 1 && !is.defined(input)) {
throw new Error('Invalid input');
}
@@ -221,7 +235,8 @@ const Sharp = function (input, options) {
angle: 0,
rotationAngle: 0,
rotationBackground: [0, 0, 0, 255],
- rotateBeforePreExtract: false,
+ rotateBefore: false,
+ orientBefore: false,
flip: false,
flop: false,
extendTop: 0,
@@ -297,6 +312,7 @@ const Sharp = function (input, options) {
withIccProfile: '',
withExif: {},
withExifMerge: true,
+ withXmp: '',
resolveWithObject: false,
loop: -1,
delay: [],
@@ -337,10 +353,12 @@ const Sharp = function (input, options) {
gifDither: 1,
gifInterFrameMaxError: 0,
gifInterPaletteMaxError: 3,
+ gifKeepDuplicateFrames: false,
gifReuse: true,
gifProgressive: false,
tiffQuality: 80,
tiffCompression: 'jpeg',
+ tiffBigtiff: false,
tiffPredictor: 'horizontal',
tiffPyramid: false,
tiffMiniswhite: false,
@@ -384,9 +402,7 @@ const Sharp = function (input, options) {
debuglog(warning);
},
// Function to notify of queue length changes
- queueListener: function (queueLength) {
- Sharp.queue.emit('change', queueLength);
- }
+ queueListener
};
this.options.input = this._createInputDescriptor(input, options, { allowStream: true });
return this;
diff --git a/lib/index.d.ts b/lib/index.d.ts
index a8f1d98df..13714c947 100644
--- a/lib/index.d.ts
+++ b/lib/index.d.ts
@@ -27,7 +27,7 @@
///
-import { Duplex } from 'stream';
+import type { Duplex } from 'node:stream';
//#region Constructor functions
@@ -419,7 +419,7 @@ declare namespace sharp {
* @returns {Sharp}
*/
autoOrient(): Sharp
-
+
/**
* Flip the image about the vertical Y axis. This always occurs after rotation, if any.
* The use of flip implies the removal of the EXIF Orientation tag, if any.
@@ -730,6 +730,20 @@ declare namespace sharp {
*/
withIccProfile(icc: string, options?: WithIccProfileOptions): Sharp;
+ /**
+ * Keep all XMP metadata from the input image in the output image.
+ * @returns A sharp instance that can be used to chain operations
+ */
+ keepXmp(): Sharp;
+
+ /**
+ * Set XMP metadata in the output image.
+ * @param {string} xmp - String containing XMP metadata to be embedded in the output image.
+ * @returns A sharp instance that can be used to chain operations
+ * @throws {Error} Invalid parameters
+ */
+ withXmp(xmp: string): Sharp;
+
/**
* Include all metadata (EXIF, XMP, IPTC) from the input image in the output image.
* The default behaviour, when withMetadata is not used, is to strip all metadata and convert to the device-independent sRGB colour space.
@@ -846,6 +860,7 @@ declare namespace sharp {
| JxlOptions
| GifOptions
| Jp2Options
+ | RawOptions
| TiffOptions,
): Sharp;
@@ -1003,12 +1018,22 @@ declare namespace sharp {
pages?: number | undefined;
/** Page number to start extracting from for multi-page input (GIF, TIFF, PDF), zero based. (optional, default 0) */
page?: number | undefined;
- /** subIFD (Sub Image File Directory) to extract for OME-TIFF, defaults to main image. (optional, default -1) */
+ /** TIFF specific input options */
+ tiff?: TiffInputOptions | undefined;
+ /** SVG specific input options */
+ svg?: SvgInputOptions | undefined;
+ /** PDF specific input options */
+ pdf?: PdfInputOptions | undefined;
+ /** OpenSlide specific input options */
+ openSlide?: OpenSlideInputOptions | undefined;
+ /** JPEG 2000 specific input options */
+ jp2?: Jp2InputOptions | undefined;
+ /** @deprecated Use {@link SharpOptions.tiff} instead */
subifd?: number | undefined;
- /** Level to extract from a multi-level input (OpenSlide), zero based. (optional, default 0) */
- level?: number | undefined;
- /** Background colour to use when PDF is partially transparent. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. */
+ /** @deprecated Use {@link SharpOptions.pdf} instead */
pdfBackground?: Colour | Color | undefined;
+ /** @deprecated Use {@link SharpOptions.openSlide} instead */
+ level?: number | undefined;
/** Set to `true` to read all frames/pages of an animated image (equivalent of setting `pages` to `-1`). (optional, default false) */
animated?: boolean | undefined;
/** Describes raw pixel input image data. See raw() for pixel ordering. */
@@ -1051,6 +1076,8 @@ declare namespace sharp {
interface CreateRaw extends Raw {
/** Specifies that the raw input has already been premultiplied, set to true to avoid sharp premultiplying the image. (optional, default false) */
premultiplied?: boolean | undefined;
+ /** The height of each page/frame for animated images, must be an integral factor of the overall image height. */
+ pageHeight?: number | undefined;
}
type CreateChannels = 3 | 4;
@@ -1066,6 +1093,9 @@ declare namespace sharp {
background: Colour | Color;
/** Describes a noise to be created. */
noise?: Noise | undefined;
+ /** The height of each page/frame for animated images, must be an integral factor of the overall image height. */
+ pageHeight?: number | undefined;
+
}
interface CreateText {
@@ -1114,6 +1144,33 @@ declare namespace sharp {
valign?: VerticalAlignment | undefined;
}
+ interface TiffInputOptions {
+ /** Sub Image File Directory to extract, defaults to main image. Use -1 for all subifds. */
+ subifd?: number | undefined;
+ }
+
+ interface SvgInputOptions {
+ /** Custom CSS for SVG input, applied with a User Origin during the CSS cascade. */
+ stylesheet?: string | undefined;
+ /** Set to `true` to render SVG input at 32-bits per channel (128-bit) instead of 8-bits per channel (32-bit) RGBA. */
+ highBitdepth?: boolean | undefined;
+ }
+
+ interface PdfInputOptions {
+ /** Background colour to use when PDF is partially transparent. Requires the use of a globally-installed libvips compiled with support for PDFium, Poppler, ImageMagick or GraphicsMagick. */
+ background?: Colour | Color | undefined;
+ }
+
+ interface OpenSlideInputOptions {
+ /** Level to extract from a multi-level input, zero based. (optional, default 0) */
+ level?: number | undefined;
+ }
+
+ interface Jp2InputOptions {
+ /** Set to `true` to load JPEG 2000 images using [oneshot mode](https://github.com/libvips/libvips/issues/4205) */
+ oneshot?: boolean | undefined;
+ }
+
interface ExifDir {
[k: string]: string;
}
@@ -1125,6 +1182,10 @@ declare namespace sharp {
'IFD3'?: ExifDir;
}
+ type HeifCompression = 'av1' | 'hevc';
+
+ type Unit = 'inch' | 'cm';
+
interface WriteableMetadata {
/** Number of pixels per inch (DPI) */
density?: number | undefined;
@@ -1198,10 +1259,12 @@ declare namespace sharp {
iptc?: Buffer | undefined;
/** Buffer containing raw XMP data, if present */
xmp?: Buffer | undefined;
+ /** String containing XMP data, if valid UTF-8 */
+ xmpAsString?: string | undefined;
/** Buffer containing raw TIFFTAG_PHOTOSHOP data, if present */
tifftagPhotoshop?: Buffer | undefined;
/** The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC) */
- compression?: 'av1' | 'hevc';
+ compression?: HeifCompression | undefined;
/** Default background colour, if present, for PNG (bKGD) and GIF images */
background?: { r: number; g: number; b: number } | { gray: number };
/** Details of each level in a multi-level image provided as an array of objects, requires libvips compiled with support for OpenSlide */
@@ -1209,7 +1272,7 @@ declare namespace sharp {
/** Number of Sub Image File Directories in an OME-TIFF image */
subifds?: number | undefined;
/** The unit of resolution (density) */
- resolutionUnit?: 'inch' | 'cm' | undefined;
+ resolutionUnit?: Unit | undefined;
/** String containing format for images loaded via *magick */
formatMagick?: string | undefined;
/** Array of keyword/text pairs representing PNG text blocks, if present. */
@@ -1365,7 +1428,7 @@ declare namespace sharp {
/** quality, integer 1-100 (optional, default 50) */
quality?: number | undefined;
/** compression format: av1, hevc (optional, default 'av1') */
- compression?: 'av1' | 'hevc' | undefined;
+ compression?: HeifCompression | undefined;
/** use lossless compression (optional, default false) */
lossless?: boolean | undefined;
/** Level of CPU effort to reduce file size, between 0 (fastest) and 9 (slowest) (optional, default 4) */
@@ -1390,9 +1453,11 @@ declare namespace sharp {
/** Level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most) (optional, default 1.0) */
dither?: number | undefined;
/** Maximum inter-frame error for transparency, between 0 (lossless) and 32 (optional, default 0) */
- interFrameMaxError?: number;
+ interFrameMaxError?: number | undefined;
/** Maximum inter-palette error for palette reuse, between 0 and 256 (optional, default 3) */
- interPaletteMaxError?: number;
+ interPaletteMaxError?: number | undefined;
+ /** Keep duplicate frames in the output instead of combining them (optional, default false) */
+ keepDuplicateFrames?: boolean | undefined;
}
interface TiffOptions extends OutputOptions {
@@ -1400,6 +1465,8 @@ declare namespace sharp {
quality?: number | undefined;
/** Compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k (optional, default 'jpeg') */
compression?: string | undefined;
+ /** Use BigTIFF variant (has no effect when compression is none) (optional, default false) */
+ bigtiff?: boolean | undefined;
/** Compression predictor options: none, horizontal, float (optional, default 'horizontal') */
predictor?: string | undefined;
/** Write an image pyramid (optional, default false) */
@@ -1419,7 +1486,7 @@ declare namespace sharp {
/** Write 1-bit images as miniswhite (optional, default false) */
miniswhite?: boolean | undefined;
/** Resolution unit options: inch, cm (optional, default 'inch') */
- resolutionUnit?: 'inch' | 'cm' | undefined;
+ resolutionUnit?: Unit | undefined;
}
interface PngOptions extends OutputOptions {
@@ -1510,7 +1577,7 @@ declare namespace sharp {
interface Noise {
/** type of generated noise, currently only gaussian is supported. */
- type?: 'gaussian' | undefined;
+ type: 'gaussian';
/** mean of pixels in generated noise. */
mean?: number | undefined;
/** standard deviation of pixels in generated noise. */
@@ -1544,7 +1611,7 @@ declare namespace sharp {
}
interface RawOptions {
- depth?: 'char' | 'uchar' | 'short' | 'ushort' | 'int' | 'uint' | 'float' | 'complex' | 'double' | 'dpcomplex';
+ depth?: keyof DepthEnum;
}
/** 1 for grayscale, 2 for grayscale + alpha, 3 for sRGB, 4 for CMYK or RGBA */
@@ -1724,9 +1791,12 @@ declare namespace sharp {
interface KernelEnum {
nearest: 'nearest';
cubic: 'cubic';
+ linear: 'linear';
mitchell: 'mitchell';
lanczos2: 'lanczos2';
lanczos3: 'lanczos3';
+ mks2013: 'mks2013';
+ mks2021: 'mks2021';
}
interface PresetEnum {
@@ -1844,6 +1914,7 @@ declare namespace sharp {
interface FormatEnum {
avif: AvailableFormatInfo;
+ dcraw: AvailableFormatInfo;
dz: AvailableFormatInfo;
exr: AvailableFormatInfo;
fits: AvailableFormatInfo;
diff --git a/lib/index.js b/lib/index.js
index 8cfc08a80..b80191d71 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const Sharp = require('./constructor');
require('./input')(Sharp);
diff --git a/lib/input.js b/lib/input.js
index d9d29f3a7..48388a1d2 100644
--- a/lib/input.js
+++ b/lib/input.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const is = require('./is');
const sharp = require('./sharp');
@@ -22,14 +22,27 @@ const align = {
high: 'high'
};
+const inputStreamParameters = [
+ // Limits and error handling
+ 'failOn', 'limitInputPixels', 'unlimited',
+ // Format-generic
+ 'animated', 'autoOrient', 'density', 'ignoreIcc', 'page', 'pages', 'sequentialRead',
+ // Format-specific
+ 'jp2', 'openSlide', 'pdf', 'raw', 'svg', 'tiff',
+ // Deprecated
+ 'failOnError', 'openSlideLevel', 'pdfBackground', 'tiffSubifd'
+];
+
/**
* Extract input options, if any, from an object.
* @private
*/
function _inputOptionsFromObject (obj) {
- const { raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground, autoOrient } = obj;
- return [raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground, autoOrient].some(is.defined)
- ? { raw, density, limitInputPixels, ignoreIcc, unlimited, sequentialRead, failOn, failOnError, animated, page, pages, subifd, pdfBackground, autoOrient }
+ const params = inputStreamParameters
+ .filter(p => is.defined(obj[p]))
+ .map(p => ([p, obj[p]]));
+ return params.length
+ ? Object.fromEntries(params)
: undefined;
}
@@ -41,7 +54,7 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
const inputDescriptor = {
autoOrient: false,
failOn: 'warning',
- limitInputPixels: Math.pow(0x3FFF, 2),
+ limitInputPixels: 0x3FFF ** 2,
ignoreIcc: false,
unlimited: false,
sequentialRead: true
@@ -137,7 +150,7 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
if (is.defined(inputOptions.limitInputPixels)) {
if (is.bool(inputOptions.limitInputPixels)) {
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels
- ? Math.pow(0x3FFF, 2)
+ ? 0x3FFF ** 2
: 0;
} else if (is.integer(inputOptions.limitInputPixels) && is.inRange(inputOptions.limitInputPixels, 0, Number.MAX_SAFE_INTEGER)) {
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels;
@@ -172,8 +185,6 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
inputDescriptor.rawWidth = inputOptions.raw.width;
inputDescriptor.rawHeight = inputOptions.raw.height;
inputDescriptor.rawChannels = inputOptions.raw.channels;
- inputDescriptor.rawPremultiplied = !!inputOptions.raw.premultiplied;
-
switch (input.constructor) {
case Uint8Array:
case Uint8ClampedArray:
@@ -207,6 +218,25 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
} else {
throw new Error('Expected width, height and channels for raw pixel input');
}
+ inputDescriptor.rawPremultiplied = false;
+ if (is.defined(inputOptions.raw.premultiplied)) {
+ if (is.bool(inputOptions.raw.premultiplied)) {
+ inputDescriptor.rawPremultiplied = inputOptions.raw.premultiplied;
+ } else {
+ throw is.invalidParameterError('raw.premultiplied', 'boolean', inputOptions.raw.premultiplied);
+ }
+ }
+ inputDescriptor.rawPageHeight = 0;
+ if (is.defined(inputOptions.raw.pageHeight)) {
+ if (is.integer(inputOptions.raw.pageHeight) && inputOptions.raw.pageHeight > 0 && inputOptions.raw.pageHeight <= inputOptions.raw.height) {
+ if (inputOptions.raw.height % inputOptions.raw.pageHeight !== 0) {
+ throw new Error(`Expected raw.height ${inputOptions.raw.height} to be a multiple of raw.pageHeight ${inputOptions.raw.pageHeight}`);
+ }
+ inputDescriptor.rawPageHeight = inputOptions.raw.pageHeight;
+ } else {
+ throw is.invalidParameterError('raw.pageHeight', 'positive integer', inputOptions.raw.pageHeight);
+ }
+ }
}
// Multi-page input (GIF, TIFF, PDF)
if (is.defined(inputOptions.animated)) {
@@ -230,26 +260,68 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
throw is.invalidParameterError('page', 'integer between 0 and 100000', inputOptions.page);
}
}
- // Multi-level input (OpenSlide)
- if (is.defined(inputOptions.level)) {
+ // OpenSlide specific options
+ if (is.object(inputOptions.openSlide) && is.defined(inputOptions.openSlide.level)) {
+ if (is.integer(inputOptions.openSlide.level) && is.inRange(inputOptions.openSlide.level, 0, 256)) {
+ inputDescriptor.openSlideLevel = inputOptions.openSlide.level;
+ } else {
+ throw is.invalidParameterError('openSlide.level', 'integer between 0 and 256', inputOptions.openSlide.level);
+ }
+ } else if (is.defined(inputOptions.level)) {
+ // Deprecated
if (is.integer(inputOptions.level) && is.inRange(inputOptions.level, 0, 256)) {
- inputDescriptor.level = inputOptions.level;
+ inputDescriptor.openSlideLevel = inputOptions.level;
} else {
throw is.invalidParameterError('level', 'integer between 0 and 256', inputOptions.level);
}
}
- // Sub Image File Directory (TIFF)
- if (is.defined(inputOptions.subifd)) {
+ // TIFF specific options
+ if (is.object(inputOptions.tiff) && is.defined(inputOptions.tiff.subifd)) {
+ if (is.integer(inputOptions.tiff.subifd) && is.inRange(inputOptions.tiff.subifd, -1, 100000)) {
+ inputDescriptor.tiffSubifd = inputOptions.tiff.subifd;
+ } else {
+ throw is.invalidParameterError('tiff.subifd', 'integer between -1 and 100000', inputOptions.tiff.subifd);
+ }
+ } else if (is.defined(inputOptions.subifd)) {
+ // Deprecated
if (is.integer(inputOptions.subifd) && is.inRange(inputOptions.subifd, -1, 100000)) {
- inputDescriptor.subifd = inputOptions.subifd;
+ inputDescriptor.tiffSubifd = inputOptions.subifd;
} else {
throw is.invalidParameterError('subifd', 'integer between -1 and 100000', inputOptions.subifd);
}
}
- // PDF background colour
- if (is.defined(inputOptions.pdfBackground)) {
+ // SVG specific options
+ if (is.object(inputOptions.svg)) {
+ if (is.defined(inputOptions.svg.stylesheet)) {
+ if (is.string(inputOptions.svg.stylesheet)) {
+ inputDescriptor.svgStylesheet = inputOptions.svg.stylesheet;
+ } else {
+ throw is.invalidParameterError('svg.stylesheet', 'string', inputOptions.svg.stylesheet);
+ }
+ }
+ if (is.defined(inputOptions.svg.highBitdepth)) {
+ if (is.bool(inputOptions.svg.highBitdepth)) {
+ inputDescriptor.svgHighBitdepth = inputOptions.svg.highBitdepth;
+ } else {
+ throw is.invalidParameterError('svg.highBitdepth', 'boolean', inputOptions.svg.highBitdepth);
+ }
+ }
+ }
+ // PDF specific options
+ if (is.object(inputOptions.pdf) && is.defined(inputOptions.pdf.background)) {
+ inputDescriptor.pdfBackground = this._getBackgroundColourOption(inputOptions.pdf.background);
+ } else if (is.defined(inputOptions.pdfBackground)) {
+ // Deprecated
inputDescriptor.pdfBackground = this._getBackgroundColourOption(inputOptions.pdfBackground);
}
+ // JPEG 2000 specific options
+ if (is.object(inputOptions.jp2) && is.defined(inputOptions.jp2.oneshot)) {
+ if (is.bool(inputOptions.jp2.oneshot)) {
+ inputDescriptor.jp2Oneshot = inputOptions.jp2.oneshot;
+ } else {
+ throw is.invalidParameterError('jp2.oneshot', 'boolean', inputOptions.jp2.oneshot);
+ }
+ }
// Create new image
if (is.defined(inputOptions.create)) {
if (
@@ -261,27 +333,44 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
inputDescriptor.createWidth = inputOptions.create.width;
inputDescriptor.createHeight = inputOptions.create.height;
inputDescriptor.createChannels = inputOptions.create.channels;
+ inputDescriptor.createPageHeight = 0;
+ if (is.defined(inputOptions.create.pageHeight)) {
+ if (is.integer(inputOptions.create.pageHeight) && inputOptions.create.pageHeight > 0 && inputOptions.create.pageHeight <= inputOptions.create.height) {
+ if (inputOptions.create.height % inputOptions.create.pageHeight !== 0) {
+ throw new Error(`Expected create.height ${inputOptions.create.height} to be a multiple of create.pageHeight ${inputOptions.create.pageHeight}`);
+ }
+ inputDescriptor.createPageHeight = inputOptions.create.pageHeight;
+ } else {
+ throw is.invalidParameterError('create.pageHeight', 'positive integer', inputOptions.create.pageHeight);
+ }
+ }
// Noise
if (is.defined(inputOptions.create.noise)) {
if (!is.object(inputOptions.create.noise)) {
throw new Error('Expected noise to be an object');
}
- if (!is.inArray(inputOptions.create.noise.type, ['gaussian'])) {
+ if (inputOptions.create.noise.type !== 'gaussian') {
throw new Error('Only gaussian noise is supported at the moment');
}
+ inputDescriptor.createNoiseType = inputOptions.create.noise.type;
if (!is.inRange(inputOptions.create.channels, 1, 4)) {
throw is.invalidParameterError('create.channels', 'number between 1 and 4', inputOptions.create.channels);
}
- inputDescriptor.createNoiseType = inputOptions.create.noise.type;
- if (is.number(inputOptions.create.noise.mean) && is.inRange(inputOptions.create.noise.mean, 0, 10000)) {
- inputDescriptor.createNoiseMean = inputOptions.create.noise.mean;
- } else {
- throw is.invalidParameterError('create.noise.mean', 'number between 0 and 10000', inputOptions.create.noise.mean);
+ inputDescriptor.createNoiseMean = 128;
+ if (is.defined(inputOptions.create.noise.mean)) {
+ if (is.number(inputOptions.create.noise.mean) && is.inRange(inputOptions.create.noise.mean, 0, 10000)) {
+ inputDescriptor.createNoiseMean = inputOptions.create.noise.mean;
+ } else {
+ throw is.invalidParameterError('create.noise.mean', 'number between 0 and 10000', inputOptions.create.noise.mean);
+ }
}
- if (is.number(inputOptions.create.noise.sigma) && is.inRange(inputOptions.create.noise.sigma, 0, 10000)) {
- inputDescriptor.createNoiseSigma = inputOptions.create.noise.sigma;
- } else {
- throw is.invalidParameterError('create.noise.sigma', 'number between 0 and 10000', inputOptions.create.noise.sigma);
+ inputDescriptor.createNoiseSigma = 30;
+ if (is.defined(inputOptions.create.noise.sigma)) {
+ if (is.number(inputOptions.create.noise.sigma) && is.inRange(inputOptions.create.noise.sigma, 0, 10000)) {
+ inputDescriptor.createNoiseSigma = inputOptions.create.noise.sigma;
+ } else {
+ throw is.invalidParameterError('create.noise.sigma', 'number between 0 and 10000', inputOptions.create.noise.sigma);
+ }
}
} else if (is.defined(inputOptions.create.background)) {
if (!is.inRange(inputOptions.create.channels, 3, 4)) {
@@ -424,7 +513,7 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
}
}
} else if (is.defined(inputOptions)) {
- throw new Error('Invalid input options ' + inputOptions);
+ throw new Error(`Invalid input options ${inputOptions}`);
}
return inputDescriptor;
}
@@ -436,10 +525,8 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
* @param {string} encoding - unused
* @param {Function} callback
*/
-function _write (chunk, encoding, callback) {
- /* istanbul ignore else */
+function _write (chunk, _encoding, callback) {
if (Array.isArray(this.options.input.buffer)) {
- /* istanbul ignore else */
if (is.buffer(chunk)) {
if (this.options.input.buffer.length === 0) {
this.on('finish', () => {
@@ -483,17 +570,17 @@ function _isStreamInput () {
* such as resize or rotate.
*
* Dimensions in the response will respect the `page` and `pages` properties of the
- * {@link /api-constructor#parameters|constructor parameters}.
+ * {@link /api-constructor/ constructor parameters}.
*
* A `Promise` is returned when `callback` is not provided.
*
- * - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
+ * - `format`: Name of decoder used to parse image e.g. `jpeg`, `png`, `webp`, `gif`, `svg`, `heif`, `tiff`
* - `size`: Total size of image in bytes, for Stream and Buffer input only
* - `width`: Number of pixels wide (EXIF orientation is not taken into consideration, see example below)
* - `height`: Number of pixels high (EXIF orientation is not taken into consideration, see example below)
- * - `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/VipsImage.html#VipsInterpretation)
+ * - `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
* - `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
- * - `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/VipsImage.html#VipsBandFormat)
+ * - `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/enum.BandFormat.html)
* - `density`: Number of pixels per inch (DPI), if present
* - `chromaSubsampling`: String containing JPEG chroma subsampling, `4:2:0` or `4:4:4` for RGB, `4:2:0:4` or `4:4:4:4` for CMYK
* - `isProgressive`: Boolean indicating whether the image is interlaced using a progressive scan
@@ -516,6 +603,7 @@ function _isStreamInput () {
* - `icc`: Buffer containing raw [ICC](https://www.npmjs.com/package/icc) profile data, if present
* - `iptc`: Buffer containing raw IPTC data, if present
* - `xmp`: Buffer containing raw XMP data, if present
+ * - `xmpAsString`: String containing XMP data, if valid UTF-8.
* - `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
* - `formatMagick`: String containing format for images loaded via *magick
* - `comments`: Array of keyword/text pairs representing PNG text blocks, if present.
@@ -704,7 +792,7 @@ function stats (callback) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
// Private
_inputOptionsFromObject,
diff --git a/lib/is.js b/lib/is.js
index a63cb2066..3ac9a1a35 100644
--- a/lib/is.js
+++ b/lib/is.js
@@ -1,61 +1,49 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
/**
* Is this value defined and not null?
* @private
*/
-const defined = function (val) {
- return typeof val !== 'undefined' && val !== null;
-};
+const defined = (val) => typeof val !== 'undefined' && val !== null;
/**
* Is this value an object?
* @private
*/
-const object = function (val) {
- return typeof val === 'object';
-};
+const object = (val) => typeof val === 'object';
/**
* Is this value a plain object?
* @private
*/
-const plainObject = function (val) {
- return Object.prototype.toString.call(val) === '[object Object]';
-};
+const plainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
/**
* Is this value a function?
* @private
*/
-const fn = function (val) {
- return typeof val === 'function';
-};
+const fn = (val) => typeof val === 'function';
/**
* Is this value a boolean?
* @private
*/
-const bool = function (val) {
- return typeof val === 'boolean';
-};
+const bool = (val) => typeof val === 'boolean';
/**
* Is this value a Buffer object?
* @private
*/
-const buffer = function (val) {
- return val instanceof Buffer;
-};
+const buffer = (val) => val instanceof Buffer;
/**
* Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
* @private
*/
-const typedArray = function (val) {
+const typedArray = (val) => {
if (defined(val)) {
switch (val.constructor) {
case Uint8Array:
@@ -78,49 +66,37 @@ const typedArray = function (val) {
* Is this value an ArrayBuffer object?
* @private
*/
-const arrayBuffer = function (val) {
- return val instanceof ArrayBuffer;
-};
+const arrayBuffer = (val) => val instanceof ArrayBuffer;
/**
* Is this value a non-empty string?
* @private
*/
-const string = function (val) {
- return typeof val === 'string' && val.length > 0;
-};
+const string = (val) => typeof val === 'string' && val.length > 0;
/**
* Is this value a real number?
* @private
*/
-const number = function (val) {
- return typeof val === 'number' && !Number.isNaN(val);
-};
+const number = (val) => typeof val === 'number' && !Number.isNaN(val);
/**
* Is this value an integer?
* @private
*/
-const integer = function (val) {
- return Number.isInteger(val);
-};
+const integer = (val) => Number.isInteger(val);
/**
* Is this value within an inclusive given range?
* @private
*/
-const inRange = function (val, min, max) {
- return val >= min && val <= max;
-};
+const inRange = (val, min, max) => val >= min && val <= max;
/**
* Is this value within the elements of an array?
* @private
*/
-const inArray = function (val, list) {
- return list.includes(val);
-};
+const inArray = (val, list) => list.includes(val);
/**
* Create an Error with a message relating to an invalid parameter.
@@ -131,11 +107,9 @@ const inArray = function (val, list) {
* @returns {Error} Containing the formatted message.
* @private
*/
-const invalidParameterError = function (name, expected, actual) {
- return new Error(
+const invalidParameterError = (name, expected, actual) => new Error(
`Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
);
-};
/**
* Ensures an Error from C++ contains a JS stack.
@@ -145,7 +119,7 @@ const invalidParameterError = function (name, expected, actual) {
* @returns {Error} Error with message and stack.
* @private
*/
-const nativeError = function (native, context) {
+const nativeError = (native, context) => {
context.message = native.message;
return context;
};
diff --git a/lib/libvips.js b/lib/libvips.js
index 1bab0ca51..881dc5c13 100644
--- a/lib/libvips.js
+++ b/lib/libvips.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const { spawnSync } = require('node:child_process');
const { createHash } = require('node:crypto');
@@ -12,13 +12,13 @@ const detectLibc = require('detect-libc');
const { config, engines, optionalDependencies } = require('../package.json');
-const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */
- config.libvips;
+/* node:coverage ignore next */
+const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || config.libvips;
const minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
const prebuiltPlatforms = [
'darwin-arm64', 'darwin-x64',
- 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-s390x', 'linux-x64',
+ 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-x64',
'linuxmusl-arm64', 'linuxmusl-x64',
'win32-arm64', 'win32-ia32', 'win32-x64'
];
@@ -36,17 +36,16 @@ const log = (item) => {
}
};
-/* istanbul ignore next */
+/* node:coverage ignore next */
const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
-/* istanbul ignore next */
const buildPlatformArch = () => {
+ /* node:coverage ignore next 3 */
if (isEmscripten()) {
return 'wasm32';
}
- /* eslint camelcase: ["error", { allow: ["^npm_config_"] }] */
const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
@@ -56,19 +55,19 @@ const buildSharpLibvipsIncludeDir = () => {
try {
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
} catch {
+ /* node:coverage ignore next 5 */
try {
return require('@img/sharp-libvips-dev/include');
} catch {}
}
- /* istanbul ignore next */
return '';
};
const buildSharpLibvipsCPlusPlusDir = () => {
+ /* node:coverage ignore next 4 */
try {
return require('@img/sharp-libvips-dev/cplusplus');
} catch {}
- /* istanbul ignore next */
return '';
};
@@ -76,16 +75,17 @@ const buildSharpLibvipsLibDir = () => {
try {
return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
} catch {
+ /* node:coverage ignore next 5 */
try {
return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
} catch {}
}
- /* istanbul ignore next */
return '';
};
+/* node:coverage disable */
+
const isUnsupportedNodeRuntime = () => {
- /* istanbul ignore next */
if (process.release?.name === 'node' && process.versions) {
if (!semverSatisfies(process.versions.node, engines.node)) {
return { found: process.versions.node, expected: engines.node };
@@ -93,14 +93,12 @@ const isUnsupportedNodeRuntime = () => {
}
};
-/* istanbul ignore next */
const isEmscripten = () => {
const { CC } = process.env;
- return Boolean(CC && CC.endsWith('/emcc'));
+ return Boolean(CC?.endsWith('/emcc'));
};
const isRosetta = () => {
- /* istanbul ignore next */
if (process.platform === 'darwin' && process.arch === 'x64') {
const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
return (translated || '').trim() === 'sysctl.proc_translated: 1';
@@ -108,6 +106,8 @@ const isRosetta = () => {
return false;
};
+/* node:coverage enable */
+
const sha512 = (s) => createHash('sha512').update(s).digest('hex');
const yarnLocator = () => {
@@ -121,7 +121,8 @@ const yarnLocator = () => {
return '';
};
-/* istanbul ignore next */
+/* node:coverage disable */
+
const spawnRebuild = () =>
spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
...spawnSyncOptions,
@@ -137,16 +138,17 @@ const globalLibvipsVersion = () => {
PKG_CONFIG_PATH: pkgConfigPath()
}
}).stdout;
- /* istanbul ignore next */
return (globalLibvipsVersion || '').trim();
} else {
return '';
}
};
-/* istanbul ignore next */
+/* node:coverage enable */
+
const pkgConfigPath = () => {
if (process.platform !== 'win32') {
+ /* node:coverage ignore next 4 */
const brewPkgConfigPath = spawnSync(
'which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',
spawnSyncOptions
@@ -178,13 +180,13 @@ const useGlobalLibvips = (logger) => {
if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
}
- /* istanbul ignore next */
+ /* node:coverage ignore next 3 */
if (isRosetta()) {
return skipSearch(false, 'Rosetta', logger);
}
const globalVipsVersion = globalLibvipsVersion();
- return !!globalVipsVersion && /* istanbul ignore next */
- semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
+ /* node:coverage ignore next */
+ return !!globalVipsVersion && semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
};
module.exports = {
diff --git a/lib/operation.js b/lib/operation.js
index f76f65dc3..ebbf54e9c 100644
--- a/lib/operation.js
+++ b/lib/operation.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const is = require('./is');
@@ -239,7 +239,7 @@ function affine (matrix, options) {
* When a `sigma` is provided, performs a slower, more accurate sharpen of the L channel in the LAB colour space.
* Fine-grained control over the level of sharpening in "flat" (m1) and "jagged" (m2) areas is available.
*
- * See {@link https://www.libvips.org/API/current/libvips-convolution.html#vips-sharpen|libvips sharpen} operation.
+ * See {@link https://www.libvips.org/API/current/method.Image.sharpen.html libvips sharpen} operation.
*
* @example
* const data = await sharp(input).sharpen().toBuffer();
@@ -485,7 +485,7 @@ function erode (width) {
/**
* Merge alpha transparency channel, if any, with a background, then remove the alpha channel.
*
- * See also {@link /api-channel#removealpha|removeAlpha}.
+ * See also {@link /api-channel#removealpha removeAlpha}.
*
* @example
* await sharp(rgbaInput)
@@ -660,7 +660,7 @@ function normalize (options) {
/**
* Perform contrast limiting adaptive histogram equalization
- * {@link https://en.wikipedia.org/wiki/Adaptive_histogram_equalization#Contrast_Limited_AHE|CLAHE}.
+ * {@link https://en.wikipedia.org/wiki/Adaptive_histogram_equalization#Contrast_Limited_AHE CLAHE}.
*
* This will, in general, enhance the clarity of the image by bringing out darker details.
*
@@ -742,9 +742,7 @@ function convolve (kernel) {
}
// Default scale is sum of kernel values
if (!is.integer(kernel.scale)) {
- kernel.scale = kernel.kernel.reduce(function (a, b) {
- return a + b;
- }, 0);
+ kernel.scale = kernel.kernel.reduce((a, b) => a + b, 0);
}
// Clip scale to a minimum value of 1
if (kernel.scale < 1) {
@@ -989,7 +987,7 @@ function modulate (options) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
autoOrient,
rotate,
diff --git a/lib/output.js b/lib/output.js
index 08d596ade..27a6ac470 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const path = require('node:path');
const is = require('./is');
@@ -43,7 +43,7 @@ const bitdepthFromColourCount = (colours) => 1 << 31 - Math.clz32(Math.ceil(Math
* Note that raw pixel data is only supported for buffer output.
*
* By default all metadata will be removed, which includes EXIF-based orientation.
- * See {@link #withmetadata|withMetadata} for control over this.
+ * See {@link #withmetadata withMetadata} for control over this.
*
* The caller is responsible for ensuring directory structures and permissions exist.
*
@@ -97,12 +97,12 @@ function toFile (fileOut, callback) {
* Write output to a Buffer.
* JPEG, PNG, WebP, AVIF, TIFF, GIF and raw pixel data output are supported.
*
- * Use {@link #toformat|toFormat} or one of the format-specific functions such as {@link jpeg}, {@link png} etc. to set the output format.
+ * Use {@link #toformat toFormat} or one of the format-specific functions such as {@link #jpeg jpeg}, {@link #png png} etc. to set the output format.
*
* If no explicit format is set, the output format will match the input image, except SVG input which becomes PNG output.
*
* By default all metadata will be removed, which includes EXIF-based orientation.
- * See {@link #withmetadata|withMetadata} for control over this.
+ * See {@link #withmetadata withMetadata} for control over this.
*
* `callback`, if present, gets three arguments `(err, data, info)` where:
* - `err` is an error, if any.
@@ -256,7 +256,7 @@ function withExifMerge (exif) {
/**
* Keep ICC profile from the input image in the output image.
*
- * Where necessary, will attempt to convert the output colour space to match the profile.
+ * When input and output colour spaces differ, use with {@link /api-colour/#tocolourspace toColourspace} and optionally {@link /api-colour/#pipelinecolourspace pipelineColourspace}.
*
* @since 0.33.0
*
@@ -265,6 +265,13 @@ function withExifMerge (exif) {
* .keepIccProfile()
* .toBuffer();
*
+ * @example
+ * const cmykOutputWithIccProfile = await sharp(cmykInputWithIccProfile)
+ * .pipelineColourspace('cmyk')
+ * .toColourspace('cmyk')
+ * .keepIccProfile()
+ * .toBuffer();
+ *
* @returns {Sharp}
*/
function keepIccProfile () {
@@ -312,6 +319,59 @@ function withIccProfile (icc, options) {
return this;
}
+/**
+ * Keep XMP metadata from the input image in the output image.
+ *
+ * @since 0.34.3
+ *
+ * @example
+ * const outputWithXmp = await sharp(inputWithXmp)
+ * .keepXmp()
+ * .toBuffer();
+ *
+ * @returns {Sharp}
+ */
+function keepXmp () {
+ this.options.keepMetadata |= 0b00010;
+ return this;
+}
+
+/**
+ * Set XMP metadata in the output image.
+ *
+ * Supported by PNG, JPEG, WebP, and TIFF output.
+ *
+ * @since 0.34.3
+ *
+ * @example
+ * const xmpString = `
+ *
+ *
+ *
+ *
+ * John Doe
+ *
+ *
+ * `;
+ *
+ * const data = await sharp(input)
+ * .withXmp(xmpString)
+ * .toBuffer();
+ *
+ * @param {string} xmp String containing XMP metadata to be embedded in the output image.
+ * @returns {Sharp}
+ * @throws {Error} Invalid parameters
+ */
+function withXmp (xmp) {
+ if (is.string(xmp) && xmp.length > 0) {
+ this.options.withXmp = xmp;
+ this.options.keepMetadata |= 0b00010;
+ } else {
+ throw is.invalidParameterError('xmp', 'non-empty string', xmp);
+ }
+ return this;
+}
+
/**
* Keep all metadata (EXIF, ICC, XMP, IPTC) from the input image in the output image.
*
@@ -512,7 +572,7 @@ function jpeg (options) {
* Set `palette` to `true` for slower, indexed PNG output.
*
* For 16 bits per pixel output, convert to `rgb16` via
- * {@link /api-colour#tocolourspace|toColourspace}.
+ * {@link /api-colour/#tocolourspace toColourspace}.
*
* @example
* // Convert any input to full colour PNG output
@@ -729,6 +789,7 @@ function webp (options) {
* @param {number} [options.dither=1.0] - level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most)
* @param {number} [options.interFrameMaxError=0] - maximum inter-frame error for transparency, between 0 (lossless) and 32
* @param {number} [options.interPaletteMaxError=3] - maximum inter-palette error for palette reuse, between 0 and 256
+ * @param {boolean} [options.keepDuplicateFrames=false] - keep duplicate frames in the output instead of combining them
* @param {number} [options.loop=0] - number of animation iterations, use 0 for infinite animation
* @param {number|number[]} [options.delay] - delay(s) between animation frames (in milliseconds)
* @param {boolean} [options.force=true] - force GIF output, otherwise attempt to use input format
@@ -779,18 +840,24 @@ function gif (options) {
throw is.invalidParameterError('interPaletteMaxError', 'number between 0.0 and 256.0', options.interPaletteMaxError);
}
}
+ if (is.defined(options.keepDuplicateFrames)) {
+ if (is.bool(options.keepDuplicateFrames)) {
+ this._setBooleanOption('gifKeepDuplicateFrames', options.keepDuplicateFrames);
+ } else {
+ throw is.invalidParameterError('keepDuplicateFrames', 'boolean', options.keepDuplicateFrames);
+ }
+ }
}
trySetAnimationOptions(options, this.options);
return this._updateFormatOut('gif', options);
}
-/* istanbul ignore next */
/**
* Use these JP2 options for output image.
*
* Requires libvips compiled with support for OpenJPEG.
* The prebuilt binaries do not include this - see
- * {@link https://sharp.pixelplumbing.com/install#custom-libvips installing a custom libvips}.
+ * {@link /install#custom-libvips installing a custom libvips}.
*
* @example
* // Convert any input to lossless JP2 output
@@ -819,6 +886,7 @@ function gif (options) {
* @throws {Error} Invalid options
*/
function jp2 (options) {
+ /* node:coverage ignore next 41 */
if (!this.constructor.format.jp2k.output.buffer) {
throw errJp2Save();
}
@@ -898,7 +966,7 @@ function trySetAnimationOptions (source, target) {
/**
* Use these TIFF options for output image.
*
- * The `density` can be set in pixels/inch via {@link #withmetadata|withMetadata}
+ * The `density` can be set in pixels/inch via {@link #withmetadata withMetadata}
* instead of providing `xres` and `yres` in pixels/mm.
*
* @example
@@ -915,6 +983,7 @@ function trySetAnimationOptions (source, target) {
* @param {number} [options.quality=80] - quality, integer 1-100
* @param {boolean} [options.force=true] - force TIFF output, otherwise attempt to use input format
* @param {string} [options.compression='jpeg'] - compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k
+ * @param {boolean} [options.bigtiff=false] - use BigTIFF variant (has no effect when compression is none)
* @param {string} [options.predictor='horizontal'] - compression predictor options: none, horizontal, float
* @param {boolean} [options.pyramid=false] - write an image pyramid
* @param {boolean} [options.tile=false] - write a tiled tiff
@@ -993,6 +1062,10 @@ function tiff (options) {
throw is.invalidParameterError('compression', 'one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k', options.compression);
}
}
+ // bigtiff
+ if (is.defined(options.bigtiff)) {
+ this._setBooleanOption('tiffBigtiff', options.bigtiff);
+ }
// predictor
if (is.defined(options.predictor)) {
if (is.string(options.predictor) && is.inArray(options.predictor, ['none', 'horizontal', 'float'])) {
@@ -1128,7 +1201,7 @@ function heif (options) {
*
* Requires libvips compiled with support for libjxl.
* The prebuilt binaries do not include this - see
- * {@link https://sharp.pixelplumbing.com/install#custom-libvips installing a custom libvips}.
+ * {@link /install/#custom-libvips installing a custom libvips}.
*
* @since 0.31.3
*
@@ -1441,7 +1514,6 @@ function _setBooleanOption (key, val) {
* @private
*/
function _read () {
- /* istanbul ignore else */
if (!this.options.streamOut) {
this.options.streamOut = true;
const stack = Error();
@@ -1558,7 +1630,7 @@ function _pipeline (callback, stack) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
// Public
toFile,
@@ -1568,6 +1640,8 @@ module.exports = function (Sharp) {
withExifMerge,
keepIccProfile,
withIccProfile,
+ keepXmp,
+ withXmp,
keepMetadata,
withMetadata,
toFormat,
diff --git a/lib/resize.js b/lib/resize.js
index 66cfd8719..544fbba3a 100644
--- a/lib/resize.js
+++ b/lib/resize.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const is = require('./is');
@@ -107,7 +107,7 @@ const mapFitToCanvas = {
* @private
*/
function isRotationExpected (options) {
- return (options.angle % 360) !== 0 || options.input.autoOrient === true || options.rotationAngle !== 0;
+ return (options.angle % 360) !== 0 || options.rotationAngle !== 0;
}
/**
@@ -150,6 +150,8 @@ function isResizeExpected (options) {
* - `mitchell`: Use a [Mitchell-Netravali spline](https://www.cs.utexas.edu/~fussell/courses/cs384g-fall2013/lectures/mitchell/Mitchell.pdf).
* - `lanczos2`: Use a [Lanczos kernel](https://en.wikipedia.org/wiki/Lanczos_resampling#Lanczos_kernel) with `a=2`.
* - `lanczos3`: Use a Lanczos kernel with `a=3` (the default).
+ * - `mks2013`: Use a [Magic Kernel Sharp](https://johncostella.com/magic/mks.pdf) 2013 kernel, as adopted by Facebook.
+ * - `mks2021`: Use a Magic Kernel Sharp 2021 kernel, with more accurate (reduced) sharpening than the 2013 version.
*
* When upsampling, these kernels map to `nearest`, `linear` and `cubic` interpolators.
* Downsampling kernels without a matching upsampling interpolator map to `cubic`.
@@ -341,7 +343,7 @@ function resize (widthOrOptions, height, options) {
}
}
if (isRotationExpected(this.options) && isResizeExpected(this.options)) {
- this.options.rotateBeforePreExtract = true;
+ this.options.rotateBefore = true;
}
return this;
}
@@ -488,9 +490,12 @@ function extract (options) {
// Ensure existing rotation occurs before pre-resize extraction
if (isRotationExpected(this.options) && !isResizeExpected(this.options)) {
if (this.options.widthPre === -1 || this.options.widthPost === -1) {
- this.options.rotateBeforePreExtract = true;
+ this.options.rotateBefore = true;
}
}
+ if (this.options.input.autoOrient) {
+ this.options.orientBefore = true;
+ }
return this;
}
@@ -564,7 +569,7 @@ function trim (options) {
}
}
if (isRotationExpected(this.options)) {
- this.options.rotateBeforePreExtract = true;
+ this.options.rotateBefore = true;
}
return this;
}
@@ -574,7 +579,7 @@ function trim (options) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
resize,
extend,
diff --git a/lib/sharp.js b/lib/sharp.js
index 78853e95f..1081c9314 100644
--- a/lib/sharp.js
+++ b/lib/sharp.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
// Inspects the runtime environment and exports the relevant sharp.node binary
@@ -17,6 +17,8 @@ const paths = [
'@img/sharp-wasm32/sharp.node'
];
+/* node:coverage disable */
+
let path, sharp;
const errors = [];
for (path of paths) {
@@ -24,12 +26,10 @@ for (path of paths) {
sharp = require(path);
break;
} catch (err) {
- /* istanbul ignore next */
errors.push(err);
}
}
-/* istanbul ignore next */
if (sharp && path.startsWith('@img/sharp-linux-x64') && !sharp._isUsingX64V2()) {
const err = new Error('Prebuilt binaries for linux-x64 require v2 microarchitecture');
err.code = 'Unsupported CPU';
@@ -37,7 +37,6 @@ if (sharp && path.startsWith('@img/sharp-linux-x64') && !sharp._isUsingX64V2())
sharp = null;
}
-/* istanbul ignore next */
if (sharp) {
module.exports = sharp;
} else {
@@ -88,7 +87,7 @@ if (sharp) {
` Found ${libcFound}`,
` Requires ${libcRequires}`
);
- } catch (errEngines) {}
+ } catch (_errEngines) {}
}
if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {
help.push(
diff --git a/lib/utility.js b/lib/utility.js
index 3c7286fb9..c0ad39f86 100644
--- a/lib/utility.js
+++ b/lib/utility.js
@@ -1,7 +1,7 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
const events = require('node:events');
const detectLibc = require('detect-libc');
@@ -57,7 +57,7 @@ const interpolators = {
let versions = {
vips: libvipsVersion.semver
};
-/* istanbul ignore next */
+/* node:coverage ignore next 15 */
if (!libvipsVersion.isGlobal) {
if (!libvipsVersion.isWasm) {
try {
@@ -75,7 +75,7 @@ if (!libvipsVersion.isGlobal) {
}
versions.sharp = require('../package.json').version;
-/* istanbul ignore next */
+/* node:coverage ignore next 5 */
if (versions.heif && format.heif) {
// Prebuilt binaries provide AV1
format.heif.input.fileSuffix = ['.avif'];
@@ -135,15 +135,9 @@ cache(true);
* e.g. libaom manages its own 4 threads when encoding AVIF images,
* and these are independent of the value set here.
*
- * The maximum number of images that sharp can process in parallel
- * is controlled by libuv's `UV_THREADPOOL_SIZE` environment variable,
- * which defaults to 4.
- *
- * https://nodejs.org/api/cli.html#uv_threadpool_sizesize
- *
- * For example, by default, a machine with 8 CPU cores will process
- * 4 images in parallel and use up to 8 threads per image,
- * so there will be up to 32 concurrent threads.
+ * :::note
+ * Further {@link /performance/ control over performance} is available.
+ * :::
*
* @example
* const threads = sharp.concurrency(); // 4
@@ -156,7 +150,7 @@ cache(true);
function concurrency (concurrency) {
return sharp.concurrency(is.integer(concurrency) ? concurrency : null);
}
-/* istanbul ignore next */
+/* node:coverage ignore next 7 */
if (detectLibc.familySync() === detectLibc.GLIBC && !sharp._isUsingJemalloc()) {
// Reduce default concurrency to 1 when using glibc memory allocator
sharp.concurrency(1);
@@ -283,7 +277,7 @@ function unblock (options) {
* @module Sharp
* @private
*/
-module.exports = function (Sharp) {
+module.exports = (Sharp) => {
Sharp.cache = cache;
Sharp.concurrency = concurrency;
Sharp.counters = counters;
diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json
index 0132543e6..df6b34a92 100644
--- a/npm/darwin-arm64/package.json
+++ b/npm/darwin-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-darwin-arm64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with macOS 64-bit ARM",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-darwin-arm64": "1.1.0"
+ "@img/sharp-libvips-darwin-arm64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json
index 0161956a4..147d109dd 100644
--- a/npm/darwin-x64/package.json
+++ b/npm/darwin-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-darwin-x64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with macOS x64",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-darwin-x64": "1.1.0"
+ "@img/sharp-libvips-darwin-x64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/from-github-release.js b/npm/from-github-release.js
deleted file mode 100644
index 84f9fb9b3..000000000
--- a/npm/from-github-release.js
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
-
-'use strict';
-
-// Populate contents of all packages with the current GitHub release
-
-const { readFile, writeFile, appendFile, copyFile, rm } = require('node:fs/promises');
-const path = require('node:path');
-const { Readable } = require('node:stream');
-const { pipeline } = require('node:stream/promises');
-const { createGunzip } = require('node:zlib');
-const { extract } = require('tar-fs');
-
-const { workspaces } = require('./package.json');
-const { version } = require('../package.json');
-
-const mapTarballEntry = (header) => {
- header.name = path.basename(header.name);
- return header;
-};
-
-const licensing = `
-## Licensing
-
-Copyright 2013 Lovell Fuller and others.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-`;
-
-workspaces.map(async platform => {
- const prebuildPlatform = platform === 'wasm32' ? 'emscripten-wasm32' : platform;
- const url = `https://github.com/lovell/sharp/releases/download/v${version}/sharp-v${version}-napi-v9-${prebuildPlatform}.tar.gz`;
- const dir = path.join(__dirname, platform);
- const response = await fetch(url);
- if (!response.ok) {
- console.log(`Skipping ${platform}: ${response.statusText}`);
- return;
- }
- // Extract prebuild tarball
- const lib = path.join(dir, 'lib');
- await rm(lib, { force: true, recursive: true });
- await pipeline(
- Readable.fromWeb(response.body),
- createGunzip(),
- extract(lib, { map: mapTarballEntry })
- );
- // Generate README
- const { name, description } = require(`./${platform}/package.json`);
- await writeFile(path.join(dir, 'README.md'), `# \`${name}\`\n\n${description}.\n${licensing}`);
- // Copy Apache-2.0 LICENSE
- await copyFile(path.join(__dirname, '..', 'LICENSE'), path.join(dir, 'LICENSE'));
- // Copy files for packages without an explicit sharp-libvips dependency (Windows, wasm)
- if (platform.startsWith('win') || platform.startsWith('wasm')) {
- const libvipsPlatform = platform === 'wasm32' ? 'dev-wasm32' : platform;
- const sharpLibvipsDir = path.join(require(`@img/sharp-libvips-${libvipsPlatform}/lib`), '..');
- // Copy versions.json
- await copyFile(path.join(sharpLibvipsDir, 'versions.json'), path.join(dir, 'versions.json'));
- // Append third party licensing to README
- const readme = await readFile(path.join(sharpLibvipsDir, 'README.md'), { encoding: 'utf-8' });
- const thirdParty = readme.substring(readme.indexOf('\nThis software contains'));
- appendFile(path.join(dir, 'README.md'), thirdParty);
- }
-});
diff --git a/npm/from-local-build.js b/npm/from-local-build.js
index ad7593ece..fc35bd2ed 100644
--- a/npm/from-local-build.js
+++ b/npm/from-local-build.js
@@ -1,26 +1,64 @@
-// Copyright 2013 Lovell Fuller and others.
-// SPDX-License-Identifier: Apache-2.0
+/*!
+ Copyright 2013 Lovell Fuller and others.
+ SPDX-License-Identifier: Apache-2.0
+*/
-'use strict';
+// Populate the npm package for the current platform with the local build
-// Populate contents of a single npm/sharpen-sharp- package
-// with the local/CI build directory for local/CI prebuild testing
-
-const fs = require('node:fs');
-const path = require('node:path');
+const { copyFileSync, cpSync, readFileSync, writeFileSync, appendFileSync } = require('node:fs');
+const { basename, join } = require('node:path');
const { buildPlatformArch } = require('../lib/libvips');
+
+const licensing = `
+## Licensing
+
+Copyright 2013 Lovell Fuller and others.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+`;
+
const platform = buildPlatformArch();
-const dest = path.join(__dirname, platform);
+const destDir = join(__dirname, platform);
+console.log(`Populating npm package for platform: ${platform}`);
-// Use same config as prebuild to copy binary files
-const release = path.join(__dirname, '..', 'src', 'build', 'Release');
-const prebuildrc = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '.prebuildrc'), 'utf8'));
-const include = new RegExp(prebuildrc['include-regex'], 'i');
-fs.cpSync(release, path.join(dest, 'lib'), {
+// Copy binaries
+const releaseDir = join(__dirname, '..', 'src', 'build', 'Release');
+const libDir = join(destDir, 'lib');
+cpSync(releaseDir, libDir, {
recursive: true,
filter: (file) => {
- const name = path.basename(file);
- return name === 'Release' || include.test(name);
+ const name = basename(file);
+ return name === 'Release' ||
+ (name.startsWith('sharp-') && name.includes('.node')) ||
+ (name.startsWith('libvips-') && name.endsWith('.dll'));
}
});
+
+// Generate README
+const { name, description } = require(`./${platform}/package.json`);
+writeFileSync(join(destDir, 'README.md'), `# \`${name}\`\n\n${description}.\n${licensing}`);
+
+// Copy Apache-2.0 LICENSE
+copyFileSync(join(__dirname, '..', 'LICENSE'), join(destDir, 'LICENSE'));
+
+// Copy files for packages without an explicit sharp-libvips dependency (Windows, wasm)
+if (platform.startsWith('win') || platform.startsWith('wasm')) {
+ const libvipsPlatform = platform === 'wasm32' ? 'dev-wasm32' : platform;
+ const sharpLibvipsDir = join(require(`@img/sharp-libvips-${libvipsPlatform}/lib`), '..');
+ // Copy versions.json
+ copyFileSync(join(sharpLibvipsDir, 'versions.json'), join(destDir, 'versions.json'));
+ // Append third party licensing to README
+ const readme = readFileSync(join(sharpLibvipsDir, 'README.md'), { encoding: 'utf-8' });
+ const thirdParty = readme.substring(readme.indexOf('\nThis software contains'));
+ appendFileSync(join(destDir, 'README.md'), thirdParty);
+}
diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json
index f03525108..cd4d5a2b6 100644
--- a/npm/linux-arm/package.json
+++ b/npm/linux-arm/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-arm",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (glibc) ARM (32-bit)",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linux-arm": "1.1.0"
+ "@img/sharp-libvips-linux-arm": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json
index 9142b138b..b373bb920 100644
--- a/npm/linux-arm64/package.json
+++ b/npm/linux-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-arm64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (glibc) 64-bit ARM",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linux-arm64": "1.1.0"
+ "@img/sharp-libvips-linux-arm64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json
index 72fd443c9..db2b62c01 100644
--- a/npm/linux-ppc64/package.json
+++ b/npm/linux-ppc64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-ppc64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (glibc) ppc64",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linux-ppc64": "1.1.0"
+ "@img/sharp-libvips-linux-ppc64": "1.2.4"
},
"files": [
"lib"
@@ -32,7 +32,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"config": {
- "glibc": ">=2.31"
+ "glibc": ">=2.36"
},
"os": [
"linux"
diff --git a/npm/linux-riscv64/package.json b/npm/linux-riscv64/package.json
new file mode 100644
index 000000000..9f0e95204
--- /dev/null
+++ b/npm/linux-riscv64/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "@img/sharp-linux-riscv64",
+ "version": "0.34.5",
+ "description": "Prebuilt sharp for use with Linux (glibc) RISC-V 64-bit",
+ "author": "Lovell Fuller ",
+ "homepage": "https://sharp.pixelplumbing.com",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/lovell/sharp.git",
+ "directory": "npm/linux-riscv64"
+ },
+ "license": "Apache-2.0",
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "preferUnplugged": true,
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-riscv64": "1.2.4"
+ },
+ "files": [
+ "lib"
+ ],
+ "publishConfig": {
+ "access": "public"
+ },
+ "type": "commonjs",
+ "exports": {
+ "./sharp.node": "./lib/sharp-linux-riscv64.node",
+ "./package": "./package.json"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "config": {
+ "glibc": ">=2.41"
+ },
+ "os": [
+ "linux"
+ ],
+ "libc": [
+ "glibc"
+ ],
+ "cpu": [
+ "riscv64"
+ ]
+}
diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json
index d4a889371..423692edd 100644
--- a/npm/linux-s390x/package.json
+++ b/npm/linux-s390x/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-s390x",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (glibc) s390x",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linux-s390x": "1.1.0"
+ "@img/sharp-libvips-linux-s390x": "1.2.4"
},
"files": [
"lib"
@@ -32,7 +32,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"config": {
- "glibc": ">=2.31"
+ "glibc": ">=2.36"
},
"os": [
"linux"
diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json
index 768a0f2fa..95a8a035f 100644
--- a/npm/linux-x64/package.json
+++ b/npm/linux-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linux-x64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (glibc) x64",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linux-x64": "1.1.0"
+ "@img/sharp-libvips-linux-x64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json
index 55ca0cf76..5e214bf18 100644
--- a/npm/linuxmusl-arm64/package.json
+++ b/npm/linuxmusl-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linuxmusl-arm64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (musl) 64-bit ARM",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-arm64": "1.1.0"
+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json
index 9f591441a..8be92db0d 100644
--- a/npm/linuxmusl-x64/package.json
+++ b/npm/linuxmusl-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-linuxmusl-x64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Linux (musl) x64",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-x64": "1.1.0"
+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4"
},
"files": [
"lib"
diff --git a/npm/package.json b/npm/package.json
index fde3bf4ed..773daa94a 100644
--- a/npm/package.json
+++ b/npm/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp",
- "version": "0.34.2",
+ "version": "0.34.5",
"private": "true",
"workspaces": [
"darwin-arm64",
@@ -8,6 +8,7 @@
"linux-arm",
"linux-arm64",
"linux-ppc64",
+ "linux-riscv64",
"linux-s390x",
"linux-x64",
"linuxmusl-arm64",
diff --git a/npm/release-notes.js b/npm/release-notes.js
new file mode 100644
index 000000000..13cc18772
--- /dev/null
+++ b/npm/release-notes.js
@@ -0,0 +1,9 @@
+const { readFileSync, writeFileSync } = require('node:fs');
+
+const { version } = require('./package.json');
+const versionWithoutPreRelease = version.replace(/-rc\.\d+$/, '');
+
+const markdown = readFileSync(`./docs/src/content/docs/changelog/v${versionWithoutPreRelease}.md`, 'utf8');
+const markdownWithoutFrontmatter = markdown.replace(/---\n.*?\n---\n+/s, '');
+
+writeFileSync('./release-notes.md', markdownWithoutFrontmatter);
diff --git a/npm/wasm32/package.json b/npm/wasm32/package.json
index 9ad9d08f5..d5775bec3 100644
--- a/npm/wasm32/package.json
+++ b/npm/wasm32/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-wasm32",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with wasm32",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
@@ -31,7 +31,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"dependencies": {
- "@emnapi/runtime": "^1.4.3"
+ "@emnapi/runtime": "^1.7.0"
},
"cpu": [
"wasm32"
diff --git a/npm/win32-arm64/package.json b/npm/win32-arm64/package.json
index cc46b899d..651f420ea 100644
--- a/npm/win32-arm64/package.json
+++ b/npm/win32-arm64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-win32-arm64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Windows 64-bit ARM",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
diff --git a/npm/win32-ia32/package.json b/npm/win32-ia32/package.json
index 2fa8c41a1..21c6dbba2 100644
--- a/npm/win32-ia32/package.json
+++ b/npm/win32-ia32/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-win32-ia32",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Windows x86 (32-bit)",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
diff --git a/npm/win32-x64/package.json b/npm/win32-x64/package.json
index 99f54be02..8b867b5e2 100644
--- a/npm/win32-x64/package.json
+++ b/npm/win32-x64/package.json
@@ -1,6 +1,6 @@
{
"name": "@img/sharp-win32-x64",
- "version": "0.34.2",
+ "version": "0.34.5",
"description": "Prebuilt sharp for use with Windows x64",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
diff --git a/package.json b/package.json
index 51a7069a4..0c0d00988 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "sharp",
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
- "version": "0.34.2",
+ "version": "0.34.5",
"author": "Lovell Fuller ",
"homepage": "https://sharp.pixelplumbing.com",
"contributors": [
@@ -92,16 +92,18 @@
"Don Denton "
],
"scripts": {
- "install": "node install/check",
+ "build": "node install/build.js",
+ "install": "node install/check.js || npm run build",
"clean": "rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",
- "test": "npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types",
- "test-lint": "semistandard && cpplint",
- "test-unit": "nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha",
- "test-licensing": "license-checker --production --summary --onlyAllow=\"Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT\"",
+ "test": "npm run lint && npm run test-unit",
+ "lint": "npm run lint-cpp && npm run lint-js && npm run lint-types",
+ "lint-cpp": "cpplint --quiet src/*.h src/*.cc",
+ "lint-js": "biome lint",
+ "lint-types": "tsd --files ./test/types/sharp.test-d.ts",
"test-leak": "./test/leak/leak.sh",
- "test-types": "tsd",
- "package-from-local-build": "node npm/from-local-build",
- "package-from-github-release": "node npm/from-github-release",
+ "test-unit": "node --experimental-test-coverage test/unit.mjs",
+ "package-from-local-build": "node npm/from-local-build.js",
+ "package-release-notes": "node npm/release-notes.js",
"docs-build": "node docs/build.mjs",
"docs-serve": "cd docs && npm start",
"docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
@@ -137,88 +139,64 @@
"vips"
],
"dependencies": {
- "color": "^4.2.3",
- "detect-libc": "^2.0.4",
- "semver": "^7.7.2"
+ "@img/colour": "^1.0.0",
+ "detect-libc": "^2.1.2",
+ "semver": "^7.7.3"
},
"optionalDependencies": {
- "@img/sharp-darwin-arm64": "0.34.2",
- "@img/sharp-darwin-x64": "0.34.2",
- "@img/sharp-libvips-darwin-arm64": "1.1.0",
- "@img/sharp-libvips-darwin-x64": "1.1.0",
- "@img/sharp-libvips-linux-arm": "1.1.0",
- "@img/sharp-libvips-linux-arm64": "1.1.0",
- "@img/sharp-libvips-linux-ppc64": "1.1.0",
- "@img/sharp-libvips-linux-s390x": "1.1.0",
- "@img/sharp-libvips-linux-x64": "1.1.0",
- "@img/sharp-libvips-linuxmusl-arm64": "1.1.0",
- "@img/sharp-libvips-linuxmusl-x64": "1.1.0",
- "@img/sharp-linux-arm": "0.34.2",
- "@img/sharp-linux-arm64": "0.34.2",
- "@img/sharp-linux-s390x": "0.34.2",
- "@img/sharp-linux-x64": "0.34.2",
- "@img/sharp-linuxmusl-arm64": "0.34.2",
- "@img/sharp-linuxmusl-x64": "0.34.2",
- "@img/sharp-wasm32": "0.34.2",
- "@img/sharp-win32-arm64": "0.34.2",
- "@img/sharp-win32-ia32": "0.34.2",
- "@img/sharp-win32-x64": "0.34.2"
+ "@img/sharp-darwin-arm64": "0.34.5",
+ "@img/sharp-darwin-x64": "0.34.5",
+ "@img/sharp-libvips-darwin-arm64": "1.2.4",
+ "@img/sharp-libvips-darwin-x64": "1.2.4",
+ "@img/sharp-libvips-linux-arm": "1.2.4",
+ "@img/sharp-libvips-linux-arm64": "1.2.4",
+ "@img/sharp-libvips-linux-ppc64": "1.2.4",
+ "@img/sharp-libvips-linux-riscv64": "1.2.4",
+ "@img/sharp-libvips-linux-s390x": "1.2.4",
+ "@img/sharp-libvips-linux-x64": "1.2.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
+ "@img/sharp-linux-arm": "0.34.5",
+ "@img/sharp-linux-arm64": "0.34.5",
+ "@img/sharp-linux-ppc64": "0.34.5",
+ "@img/sharp-linux-riscv64": "0.34.5",
+ "@img/sharp-linux-s390x": "0.34.5",
+ "@img/sharp-linux-x64": "0.34.5",
+ "@img/sharp-linuxmusl-arm64": "0.34.5",
+ "@img/sharp-linuxmusl-x64": "0.34.5",
+ "@img/sharp-wasm32": "0.34.5",
+ "@img/sharp-win32-arm64": "0.34.5",
+ "@img/sharp-win32-ia32": "0.34.5",
+ "@img/sharp-win32-x64": "0.34.5"
},
"devDependencies": {
- "@emnapi/runtime": "^1.4.3",
- "@img/sharp-libvips-dev": "1.1.0",
- "@img/sharp-libvips-dev-wasm32": "1.1.0",
- "@img/sharp-libvips-win32-arm64": "1.1.0",
- "@img/sharp-libvips-win32-ia32": "1.1.0",
- "@img/sharp-libvips-win32-x64": "1.1.0",
+ "@biomejs/biome": "^2.3.4",
+ "@cpplint/cli": "^0.1.0",
+ "@emnapi/runtime": "^1.7.0",
+ "@img/sharp-libvips-dev": "1.2.4",
+ "@img/sharp-libvips-dev-wasm32": "1.2.4",
+ "@img/sharp-libvips-win32-arm64": "1.2.4",
+ "@img/sharp-libvips-win32-ia32": "1.2.4",
+ "@img/sharp-libvips-win32-x64": "1.2.4",
"@types/node": "*",
- "cc": "^3.0.1",
- "emnapi": "^1.4.3",
+ "emnapi": "^1.7.0",
"exif-reader": "^2.0.2",
"extract-zip": "^2.0.1",
"icc": "^3.0.0",
- "jsdoc-to-markdown": "^9.1.1",
- "license-checker": "^25.0.1",
- "mocha": "^11.4.0",
- "node-addon-api": "^8.3.1",
- "nyc": "^17.1.0",
- "prebuild": "^13.0.1",
- "semistandard": "^17.0.0",
- "tar-fs": "^3.0.8",
- "tsd": "^0.32.0"
+ "jsdoc-to-markdown": "^9.1.3",
+ "node-addon-api": "^8.5.0",
+ "node-gyp": "^11.5.0",
+ "tar-fs": "^3.1.1",
+ "tsd": "^0.33.0"
},
"license": "Apache-2.0",
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"config": {
- "libvips": ">=8.16.1"
+ "libvips": ">=8.17.3"
},
"funding": {
"url": "https://opencollective.com/libvips"
- },
- "binary": {
- "napi_versions": [
- 9
- ]
- },
- "semistandard": {
- "env": [
- "mocha"
- ]
- },
- "cc": {
- "linelength": "120",
- "filter": [
- "build/include"
- ]
- },
- "nyc": {
- "include": [
- "lib"
- ]
- },
- "tsd": {
- "directory": "test/types/"
}
}
diff --git a/src/CPPLINT.cfg b/src/CPPLINT.cfg
new file mode 100644
index 000000000..7a643b075
--- /dev/null
+++ b/src/CPPLINT.cfg
@@ -0,0 +1,10 @@
+set noparent
+
+linelength=120
+
+filter=-build/include
+filter=+build/include_alpha
+filter=+build/include_subdir
+filter=+build/include_what_you_use
+
+filter=-whitespace/indent_namespace
diff --git a/src/binding.gyp b/src/binding.gyp
index 0fbf515ea..2040cde5b 100644
--- a/src/binding.gyp
+++ b/src/binding.gyp
@@ -120,7 +120,7 @@
'conditions': [
['use_global_libvips == "true"', {
# Use pkg-config for include and lib
- 'include_dirs': ['
#include
+#include