mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 21:56:18 +01:00
Compare commits
95 Commits
v0.34.3
...
temp-std-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17d4a684df | ||
|
|
ed6b7384d0 | ||
|
|
ef77388a73 | ||
|
|
66764b359b | ||
|
|
8561f0da1d | ||
|
|
0468c1be9f | ||
|
|
4b1680c312 | ||
|
|
2346722c0d | ||
|
|
a5e726002c | ||
|
|
d161e45e06 | ||
|
|
006d37b2d0 | ||
|
|
0d872bd13a | ||
|
|
1cf4b7f04d | ||
|
|
e50c0c2e04 | ||
|
|
3278a9a913 | ||
|
|
1b2f79335d | ||
|
|
937167933b | ||
|
|
dbcb7e60bd | ||
|
|
e1bad5470e | ||
|
|
1a2c1c8833 | ||
|
|
aaeded2b67 | ||
|
|
f6cdd36559 | ||
|
|
283c7d3f0c | ||
|
|
34c39fa194 | ||
|
|
7b4c476243 | ||
|
|
084a30f8bf | ||
|
|
3609c61a22 | ||
|
|
dc6820b49f | ||
|
|
f2a49d19c9 | ||
|
|
e062456868 | ||
|
|
6450c704a6 | ||
|
|
f7c95d1bf0 | ||
|
|
ef86a75560 | ||
|
|
6c1e840098 | ||
|
|
e1628d8ef5 | ||
|
|
4f9f8179a6 | ||
|
|
09d5aa8cfa | ||
|
|
040b73ca74 | ||
|
|
1f2f33d9a7 | ||
|
|
69b2c45615 | ||
|
|
9e4e184132 | ||
|
|
206eb4a89a | ||
|
|
c1c16ed3e6 | ||
|
|
b7fda60a85 | ||
|
|
1bbee519aa | ||
|
|
2324d75f7f | ||
|
|
5e72ad95fa | ||
|
|
6b922b30d5 | ||
|
|
54722dd582 | ||
|
|
adb6275ae9 | ||
|
|
f2978651f0 | ||
|
|
c446d743a2 | ||
|
|
3498eb63e3 | ||
|
|
3009957120 | ||
|
|
b36237ddcb | ||
|
|
a0af662d78 | ||
|
|
ee437832e2 | ||
|
|
529901177b | ||
|
|
4710092b2a | ||
|
|
ed1ac43e55 | ||
|
|
dfcbceee4b | ||
|
|
35d3f56c67 | ||
|
|
9f4bace03b | ||
|
|
b507831a11 | ||
|
|
905f69837e | ||
|
|
b0154ed83c | ||
|
|
93b814f849 | ||
|
|
6d4d44e2fa | ||
|
|
d8686e7c64 | ||
|
|
23a0e81d98 | ||
|
|
43b579c903 | ||
|
|
45f8717900 | ||
|
|
c270455007 | ||
|
|
1835288ab8 | ||
|
|
c1e33de33c | ||
|
|
0e4b648593 | ||
|
|
40be212bba | ||
|
|
8ceeda9ae9 | ||
|
|
16e248f93e | ||
|
|
b77c97067a | ||
|
|
660bbdb1c0 | ||
|
|
4164705113 | ||
|
|
c01e272db5 | ||
|
|
8607ff2f4a | ||
|
|
cd337e4de3 | ||
|
|
51d1a49abc | ||
|
|
dda00f63e6 | ||
|
|
9e20a25c5d | ||
|
|
fefda85d2d | ||
|
|
e045235545 | ||
|
|
08b4242efe | ||
|
|
67462bee79 | ||
|
|
628454559e | ||
|
|
ecfc77c185 | ||
|
|
6cde18d443 |
17
.cirrus.yml
17
.cirrus.yml
@@ -1,17 +0,0 @@
|
|||||||
freebsd_instance:
|
|
||||||
image_family: freebsd-15-0-snap
|
|
||||||
|
|
||||||
task:
|
|
||||||
name: FreeBSD
|
|
||||||
env:
|
|
||||||
IGNORE_OSVERSION: yes
|
|
||||||
skip_notifications: true
|
|
||||||
prerequisites_script:
|
|
||||||
- pkg update -f
|
|
||||||
- pkg upgrade -y
|
|
||||||
- pkg install -y devel/git devel/pkgconf graphics/vips www/node20 www/npm
|
|
||||||
- pkg-config --modversion vips-cpp
|
|
||||||
install_script:
|
|
||||||
- npm install --build-from-source
|
|
||||||
test_script:
|
|
||||||
- npx mocha --no-config --spec=test/unit/io.js --timeout=30000
|
|
||||||
@@ -7,6 +7,4 @@ indent_size = 2
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
max_line_length = 120
|
||||||
[*.md]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|||||||
7
.github/CONTRIBUTING.md
vendored
7
.github/CONTRIBUTING.md
vendored
@@ -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.
|
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.
|
New bugs are assigned a `triage` label whilst under investigation.
|
||||||
|
|
||||||
## Submit a new feature request
|
## 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.
|
it's probably fastest to add a comment to it about your requirement.
|
||||||
|
|
||||||
Implementation is usually straightforward if libvips
|
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.
|
the feature you need.
|
||||||
|
|
||||||
## Submit a Pull Request to fix a bug
|
## 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`.
|
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
|
## 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.
|
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).
|
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
|
Where possible, the functional tests use gradient-based perceptual hashes
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/installation.md
vendored
2
.github/ISSUE_TEMPLATE/installation.md
vendored
@@ -31,7 +31,7 @@ please open an issue against that package instead.
|
|||||||
|
|
||||||
<!-- Please place an [x] in the relevant box to confirm. -->
|
<!-- Please place an [x] in the relevant box to confirm. -->
|
||||||
|
|
||||||
- [ ] I am using Node.js with a version that satisfies `^18.17.0 || ^20.3.0 || >=21.0.0`
|
- [ ] I am using Node.js with a version that satisfies `>=20.9.0`
|
||||||
- [ ] I am using Deno
|
- [ ] I am using Deno
|
||||||
- [ ] I am using Bun
|
- [ ] I am using Bun
|
||||||
|
|
||||||
|
|||||||
287
.github/workflows/ci.yml
vendored
287
.github/workflows/ci.yml
vendored
@@ -4,9 +4,23 @@ on:
|
|||||||
- pull_request
|
- pull_request
|
||||||
permissions: {}
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: actions/setup-node@v6
|
||||||
|
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:
|
build-native:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
needs: lint
|
||||||
name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
|
name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
@@ -17,123 +31,124 @@ jobs:
|
|||||||
- os: ubuntu-24.04
|
- os: ubuntu-24.04
|
||||||
container: rockylinux:8
|
container: rockylinux:8
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^18.17.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
package: true
|
package: true
|
||||||
- os: ubuntu-24.04
|
- os: ubuntu-24.04
|
||||||
container: rockylinux:8
|
container: rockylinux:8
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^20.3.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 20
|
|
||||||
platform: linux-x64
|
|
||||||
- os: ubuntu-24.04
|
|
||||||
container: rockylinux:8
|
|
||||||
nodejs_arch: x64
|
|
||||||
nodejs_version: "^22.9.0"
|
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 22
|
||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
- os: ubuntu-24.04
|
- os: ubuntu-24.04
|
||||||
container: node:18-alpine3.17
|
container: rockylinux:8
|
||||||
nodejs_version_major: 18
|
nodejs_arch: x64
|
||||||
platform: linuxmusl-x64
|
nodejs_version: "^24"
|
||||||
package: true
|
nodejs_version_major: 24
|
||||||
|
platform: linux-x64
|
||||||
- os: ubuntu-24.04
|
- os: ubuntu-24.04
|
||||||
container: node:20-alpine3.18
|
container: node:20-alpine3.18
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 20
|
||||||
platform: linuxmusl-x64
|
platform: linuxmusl-x64
|
||||||
|
package: true
|
||||||
- os: ubuntu-24.04
|
- os: ubuntu-24.04
|
||||||
container: node:22-alpine3.20
|
container: node:22-alpine3.20
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 22
|
||||||
platform: linuxmusl-x64
|
platform: linuxmusl-x64
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
container: node:24-alpine3.22
|
||||||
|
nodejs_version_major: 24
|
||||||
|
platform: linuxmusl-x64
|
||||||
- os: ubuntu-24.04-arm
|
- os: ubuntu-24.04-arm
|
||||||
container: arm64v8/rockylinux:8
|
container: arm64v8/rockylinux:8
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^18.17.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
platform: linux-arm64
|
platform: linux-arm64
|
||||||
package: true
|
package: true
|
||||||
- os: ubuntu-24.04-arm
|
- os: ubuntu-24.04-arm
|
||||||
container: arm64v8/rockylinux:8
|
container: arm64v8/rockylinux:8
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^20.3.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 22
|
||||||
platform: linux-arm64
|
platform: linux-arm64
|
||||||
- os: macos-13
|
- os: ubuntu-24.04-arm
|
||||||
|
container: arm64v8/rockylinux:8
|
||||||
|
nodejs_arch: arm64
|
||||||
|
nodejs_version: "^24"
|
||||||
|
nodejs_version_major: 24
|
||||||
|
platform: linux-arm64
|
||||||
|
- os: macos-15-intel
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^18.17.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
|
||||||
platform: darwin-x64
|
|
||||||
package: true
|
|
||||||
- os: macos-13
|
|
||||||
nodejs_arch: x64
|
|
||||||
nodejs_version: "^20.3.0"
|
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 20
|
||||||
platform: darwin-x64
|
platform: darwin-x64
|
||||||
- os: macos-13
|
package: true
|
||||||
|
- os: macos-15-intel
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^22.9.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 22
|
||||||
platform: darwin-x64
|
platform: darwin-x64
|
||||||
- os: macos-14
|
- os: macos-15-intel
|
||||||
|
nodejs_arch: x64
|
||||||
|
nodejs_version: "^24"
|
||||||
|
nodejs_version_major: 24
|
||||||
|
platform: darwin-x64
|
||||||
|
- os: macos-15
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^18.17.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
|
||||||
platform: darwin-arm64
|
|
||||||
package: true
|
|
||||||
- os: macos-14
|
|
||||||
nodejs_arch: arm64
|
|
||||||
nodejs_version: "^20.3.0"
|
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 20
|
||||||
platform: darwin-arm64
|
platform: darwin-arm64
|
||||||
- os: macos-14
|
package: true
|
||||||
|
- os: macos-15
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^22.9.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 22
|
||||||
platform: darwin-arm64
|
platform: darwin-arm64
|
||||||
|
- os: macos-15
|
||||||
|
nodejs_arch: arm64
|
||||||
|
nodejs_version: "^24"
|
||||||
|
nodejs_version_major: 24
|
||||||
|
platform: darwin-arm64
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
nodejs_arch: x86
|
nodejs_arch: x86
|
||||||
nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
platform: win32-ia32
|
platform: win32-ia32
|
||||||
package: true
|
package: true
|
||||||
- os: windows-2022
|
|
||||||
nodejs_arch: x86
|
|
||||||
nodejs_version: "^20.3.0"
|
|
||||||
nodejs_version_major: 20
|
|
||||||
platform: win32-ia32
|
|
||||||
- os: windows-2022
|
|
||||||
nodejs_arch: x86
|
|
||||||
nodejs_version: "^22.9.0"
|
|
||||||
nodejs_version_major: 22
|
|
||||||
platform: win32-ia32
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^18.17.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
platform: win32-x64
|
platform: win32-x64
|
||||||
package: true
|
package: true
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^20.3.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 22
|
||||||
platform: win32-x64
|
platform: win32-x64
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
nodejs_arch: x64
|
nodejs_arch: x64
|
||||||
nodejs_version: "^22.9.0"
|
nodejs_version: "^24"
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 24
|
||||||
platform: win32-x64
|
platform: win32-x64
|
||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^20.3.0"
|
nodejs_version: "^20.9.0"
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 20
|
||||||
platform: win32-arm64
|
platform: win32-arm64
|
||||||
package: true
|
package: true
|
||||||
- os: windows-11-arm
|
- os: windows-11-arm
|
||||||
nodejs_arch: arm64
|
nodejs_arch: arm64
|
||||||
nodejs_version: "^22.9.0"
|
nodejs_version: "^22"
|
||||||
nodejs_version_major: 22
|
nodejs_version_major: 22
|
||||||
platform: win32-arm64
|
platform: win32-arm64
|
||||||
|
- os: windows-11-arm
|
||||||
|
nodejs_arch: arm64
|
||||||
|
nodejs_version: "^24"
|
||||||
|
nodejs_version_major: 24
|
||||||
|
platform: win32-arm64
|
||||||
steps:
|
steps:
|
||||||
- name: Dependencies (Rocky Linux glibc)
|
- name: Dependencies (Rocky Linux glibc)
|
||||||
if: contains(matrix.container, 'rockylinux')
|
if: contains(matrix.container, 'rockylinux')
|
||||||
@@ -145,69 +160,67 @@ jobs:
|
|||||||
run: apk add build-base git python3 font-noto --update-cache
|
run: apk add build-base git python3 font-noto --update-cache
|
||||||
- name: Dependencies (Python 3.11 - macOS, Windows)
|
- name: Dependencies (Python 3.11 - macOS, Windows)
|
||||||
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
|
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
- name: Dependencies (Node.js)
|
- name: Dependencies (Node.js)
|
||||||
if: "!contains(matrix.platform, 'linuxmusl')"
|
if: "!contains(matrix.platform, 'linuxmusl')"
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.nodejs_version }}
|
node-version: ${{ matrix.nodejs_version }}
|
||||||
architecture: ${{ matrix.nodejs_arch }}
|
architecture: ${{ matrix.nodejs_arch }}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Install
|
- run: npm install
|
||||||
run: npm install --build-from-source
|
- run: npm run build
|
||||||
- name: Test
|
- run: npm run test-unit
|
||||||
run: npm test
|
- if: matrix.package
|
||||||
- name: Populate npm package
|
|
||||||
if: matrix.package
|
|
||||||
run: npm run package-from-local-build
|
run: npm run package-from-local-build
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v6
|
||||||
if: matrix.package
|
if: matrix.package
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}
|
name: ${{ matrix.platform }}
|
||||||
path: npm/${{ matrix.platform }}
|
path: npm/${{ matrix.platform }}
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
build-linuxmusl-arm-64:
|
build-linuxmusl-arm64:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
needs: lint
|
||||||
name: "build-linuxmusl-arm64 [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
|
name: "build-linuxmusl-arm64 [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}"
|
||||||
runs-on: ubuntu-24.04-arm
|
runs-on: ubuntu-24.04-arm
|
||||||
container:
|
container:
|
||||||
image: ${{ matrix.container }}
|
image: ${{ matrix.container }}
|
||||||
volumes:
|
volumes:
|
||||||
- /:/host
|
- /opt:/opt:rw,rshared
|
||||||
|
- /opt:/__e/node24:ro,rshared
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- container: node:18-alpine3.17
|
- container: node:20-alpine3.20
|
||||||
nodejs_version_major: 18
|
|
||||||
package: true
|
|
||||||
- container: node:20-alpine3.18
|
|
||||||
nodejs_version_major: 20
|
nodejs_version_major: 20
|
||||||
|
package: true
|
||||||
|
- container: node:22-alpine3.20
|
||||||
|
nodejs_version_major: 22
|
||||||
|
- container: node:24-alpine3.22
|
||||||
|
nodejs_version_major: 24
|
||||||
steps:
|
steps:
|
||||||
- name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757
|
- name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757
|
||||||
shell: sh
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
apk add nodejs
|
sed -i "/^ID=/s/alpine/NotpineForGHA/" /etc/os-release
|
||||||
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
|
apk add nodejs --update-cache
|
||||||
cd /host/home/runner/runners/*/externals/
|
mkdir /opt/bin
|
||||||
rm -rf node20/*
|
ln -s /usr/bin/node /opt/bin/node
|
||||||
mkdir node20/bin
|
|
||||||
ln -s /usr/bin/node node20/bin/node
|
|
||||||
- name: Dependencies
|
- name: Dependencies
|
||||||
run: apk add build-base git python3 font-noto --update-cache
|
run: apk add build-base git python3 font-noto --update-cache
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Install
|
- run: npm install
|
||||||
run: npm install --build-from-source
|
- run: npm run build
|
||||||
- name: Test
|
- run: npm run test-unit
|
||||||
run: npm test
|
- if: matrix.package
|
||||||
- name: Populate npm package
|
|
||||||
if: matrix.package
|
|
||||||
run: npm run package-from-local-build
|
run: npm run package-from-local-build
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v6
|
||||||
if: matrix.package
|
if: matrix.package
|
||||||
with:
|
with:
|
||||||
name: linuxmusl-arm64
|
name: linuxmusl-arm64
|
||||||
@@ -217,6 +230,7 @@ jobs:
|
|||||||
build-qemu:
|
build-qemu:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
needs: lint
|
||||||
name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] [package]"
|
name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] [package]"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
@@ -224,63 +238,93 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- platform: linux-arm
|
- platform: linux-arm
|
||||||
distro: bullseye
|
base_image: "balenalib/rpi-raspbian:bullseye"
|
||||||
run_on_arch: armv6
|
|
||||||
nodejs_arch: armv6l
|
nodejs_arch: armv6l
|
||||||
nodejs_hostname: unofficial-builds.nodejs.org
|
nodejs_hostname: unofficial-builds.nodejs.org
|
||||||
nodejs_version: "18.17.0"
|
nodejs_version: "20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
- platform: linux-s390x
|
- platform: linux-s390x
|
||||||
distro: bullseye
|
base_image: "--platform=linux/s390x s390x/debian:bookworm"
|
||||||
run_on_arch: s390x
|
|
||||||
nodejs_arch: s390x
|
nodejs_arch: s390x
|
||||||
nodejs_hostname: nodejs.org
|
nodejs_hostname: nodejs.org
|
||||||
nodejs_version: "18.17.0"
|
nodejs_version: "20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
- platform: linux-ppc64
|
- platform: linux-ppc64
|
||||||
distro: bullseye
|
base_image: "--platform=linux/ppc64le ppc64le/debian:bookworm"
|
||||||
run_on_arch: ppc64le
|
|
||||||
nodejs_arch: ppc64le
|
nodejs_arch: ppc64le
|
||||||
nodejs_hostname: nodejs.org
|
nodejs_hostname: nodejs.org
|
||||||
nodejs_version: "18.17.0"
|
nodejs_version: "20.9.0"
|
||||||
nodejs_version_major: 18
|
nodejs_version_major: 20
|
||||||
|
- 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:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: uraimo/run-on-arch-action@v3
|
- uses: uraimo/run-on-arch-action@v3
|
||||||
with:
|
with:
|
||||||
arch: ${{ matrix.run_on_arch }}
|
arch: none
|
||||||
distro: ${{ matrix.distro }}
|
distro: none
|
||||||
|
base_image: ${{ matrix.base_image }}
|
||||||
|
env: |
|
||||||
|
CFLAGS: "${{ matrix.compiler_flags }}"
|
||||||
|
CXXFLAGS: "${{ matrix.compiler_flags }}"
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y curl g++ git libatomic1 make python3 xz-utils
|
apt-get install -y curl g++ git libatomic1 make python3 xz-utils
|
||||||
mkdir /opt/nodejs
|
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
|
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
|
export PATH=$PATH:/opt/nodejs/bin
|
||||||
npm install --build-from-source
|
npm install
|
||||||
npx mocha --no-config --spec=test/unit/io.js --timeout=30000
|
npm run build
|
||||||
|
node --test test/unit/io.js
|
||||||
npm run package-from-local-build
|
npm run package-from-local-build
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.platform }}
|
name: ${{ matrix.platform }}
|
||||||
path: npm/${{ matrix.platform }}
|
path: npm/${{ matrix.platform }}
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
build-freebsd:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
needs: lint
|
||||||
|
name: "build-freebsd"
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: vmactions/freebsd-vm@v1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
prepare: |
|
||||||
|
pkg update -f
|
||||||
|
pkg upgrade -y
|
||||||
|
pkg install -y devel/git devel/pkgconf graphics/vips www/node22 www/npm
|
||||||
|
pkg-config --modversion vips-cpp
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
node --test test/unit/io.js
|
||||||
build-emscripten:
|
build-emscripten:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
needs: lint
|
||||||
name: "build-wasm32 [package]"
|
name: "build-wasm32 [package]"
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container: "emscripten/emsdk:4.0.10"
|
container: "emscripten/emsdk:4.0.21"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Dependencies
|
- name: Dependencies
|
||||||
run: apt-get update && apt-get install -y pkg-config
|
run: apt-get update && apt-get install -y pkg-config
|
||||||
- name: Dependencies (Node.js)
|
- name: Dependencies (Node.js)
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
- name: Install
|
- run: npm install
|
||||||
run: emmake npm install --build-from-source
|
- run: emmake npm run build
|
||||||
- name: Verify emscripten versions match
|
- name: Verify emscripten versions match
|
||||||
run: |
|
run: |
|
||||||
EMSCRIPTEN_VERSION_LIBVIPS=$(node -p "require('@img/sharp-libvips-dev-wasm32/versions').emscripten")
|
EMSCRIPTEN_VERSION_LIBVIPS=$(node -p "require('@img/sharp-libvips-dev-wasm32/versions').emscripten")
|
||||||
@@ -288,11 +332,9 @@ jobs:
|
|||||||
echo "libvips built with emscripten $EMSCRIPTEN_VERSION_LIBVIPS"
|
echo "libvips built with emscripten $EMSCRIPTEN_VERSION_LIBVIPS"
|
||||||
echo "sharp built with emscripten $EMSCRIPTEN_VERSION_SHARP"
|
echo "sharp built with emscripten $EMSCRIPTEN_VERSION_SHARP"
|
||||||
test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP"
|
test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP"
|
||||||
- name: Test
|
- run: emmake npm run test-unit
|
||||||
run: emmake npm test
|
- run: emmake npm run package-from-local-build
|
||||||
- name: Populate npm package
|
- uses: actions/upload-artifact@v6
|
||||||
run: emmake npm run package-from-local-build
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: wasm32
|
name: wasm32
|
||||||
path: npm/wasm32
|
path: npm/wasm32
|
||||||
@@ -301,19 +343,25 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- build-native
|
- build-native
|
||||||
- build-linuxmusl-arm-64
|
- build-linuxmusl-arm64
|
||||||
- build-qemu
|
- build-qemu
|
||||||
- build-emscripten
|
- build-emscripten
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
path: npm
|
path: npm
|
||||||
- name: Create npm workspace tarball
|
- name: Create npm workspace tarball
|
||||||
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
|
||||||
|
- uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
- name: Create release notes
|
||||||
|
run: npm run package-release-notes
|
||||||
- name: Create GitHub release for tag
|
- name: Create GitHub release for tag
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
@@ -322,3 +370,10 @@ jobs:
|
|||||||
artifactContentType: application/x-xz
|
artifactContentType: application/x-xz
|
||||||
prerelease: ${{ contains(github.ref, '-rc') }}
|
prerelease: ${{ contains(github.ref, '-rc') }}
|
||||||
makeLatest: ${{ !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' }}
|
||||||
|
|||||||
26
.github/workflows/npm.yml
vendored
26
.github/workflows/npm.yml
vendored
@@ -43,30 +43,30 @@ jobs:
|
|||||||
runtime: bun
|
runtime: bun
|
||||||
|
|
||||||
- name: darwin-x64-node-npm
|
- name: darwin-x64-node-npm
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: node
|
runtime: node
|
||||||
package-manager: npm
|
package-manager: npm
|
||||||
- name: darwin-x64-node-pnpm
|
- name: darwin-x64-node-pnpm
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: node
|
runtime: node
|
||||||
package-manager: pnpm
|
package-manager: pnpm
|
||||||
- name: darwin-x64-node-yarn
|
- name: darwin-x64-node-yarn
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: node
|
runtime: node
|
||||||
package-manager: yarn
|
package-manager: yarn
|
||||||
- name: darwin-x64-node-yarn-pnp
|
- name: darwin-x64-node-yarn-pnp
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: node
|
runtime: node
|
||||||
package-manager: yarn-pnp
|
package-manager: yarn-pnp
|
||||||
- name: darwin-x64-node-yarn-v1
|
- name: darwin-x64-node-yarn-v1
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: node
|
runtime: node
|
||||||
package-manager: yarn-v1
|
package-manager: yarn-v1
|
||||||
- name: darwin-x64-deno
|
- name: darwin-x64-deno
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: deno
|
runtime: deno
|
||||||
- name: darwin-x64-bun
|
- name: darwin-x64-bun
|
||||||
runs-on: macos-13
|
runs-on: macos-15-intel
|
||||||
runtime: bun
|
runtime: bun
|
||||||
|
|
||||||
- name: win32-x64-node-npm
|
- name: win32-x64-node-npm
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
if: ${{ matrix.runtime == 'node' }}
|
if: ${{ matrix.runtime == 'node' }}
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
@@ -106,9 +106,9 @@ jobs:
|
|||||||
version: 8
|
version: 8
|
||||||
- name: Install Deno
|
- name: Install Deno
|
||||||
if: ${{ matrix.runtime == 'deno' }}
|
if: ${{ matrix.runtime == 'deno' }}
|
||||||
uses: denoland/setup-deno@v1
|
uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: v1.x
|
deno-version: v2.x
|
||||||
- name: Install Bun
|
- name: Install Bun
|
||||||
if: ${{ matrix.runtime == 'bun' }}
|
if: ${{ matrix.runtime == 'bun' }}
|
||||||
uses: oven-sh/setup-bun@v2
|
uses: oven-sh/setup-bun@v2
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Version
|
- name: Version
|
||||||
id: version
|
id: version
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setOutput('semver', context.ref.replace('refs/tags/v',''))
|
core.setOutput('semver', context.ref.replace('refs/tags/v',''))
|
||||||
@@ -185,7 +185,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Run with Deno
|
- name: Run with Deno
|
||||||
if: ${{ matrix.runtime == '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
|
- name: Run with Bun
|
||||||
if: ${{ matrix.runtime == 'bun' }}
|
if: ${{ matrix.runtime == 'bun' }}
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
src/build
|
src/build
|
||||||
src/node_modules
|
src/node_modules
|
||||||
node_modules
|
node_modules
|
||||||
/coverage
|
|
||||||
npm/*/*
|
npm/*/*
|
||||||
!npm/*/package.json
|
!npm/*/package.json
|
||||||
test/bench/node_modules
|
test/bench/node_modules
|
||||||
@@ -9,10 +8,10 @@ test/fixtures/output*
|
|||||||
test/fixtures/vips-properties.xml
|
test/fixtures/vips-properties.xml
|
||||||
test/leak/libvips.supp
|
test/leak/libvips.supp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.nyc_output
|
|
||||||
.vscode/
|
.vscode/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
.idea
|
.idea
|
||||||
.firebase
|
.firebase
|
||||||
.astro
|
.astro
|
||||||
docs/dist
|
docs/dist
|
||||||
|
release-notes.md
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"parallel": true,
|
|
||||||
"slow": 1000,
|
|
||||||
"timeout": 30000,
|
|
||||||
"require": "./test/beforeEach.js",
|
|
||||||
"spec": "./test/unit/*.js"
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,7 @@ smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions
|
|||||||
|
|
||||||
It can be used with all JavaScript runtimes
|
It can be used with all JavaScript runtimes
|
||||||
that provide support for Node-API v9, including
|
that provide support for Node-API v9, including
|
||||||
Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.
|
Node.js (>= 20.9.0), Deno and Bun.
|
||||||
|
|
||||||
Resizing an image is typically 4x-5x faster than using the
|
Resizing an image is typically 4x-5x faster than using the
|
||||||
quickest ImageMagick and GraphicsMagick settings
|
quickest ImageMagick and GraphicsMagick settings
|
||||||
|
|||||||
26
biome.json
Normal file
26
biome.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.3.10/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig } from 'astro/config';
|
|
||||||
import starlight from '@astrojs/starlight';
|
import starlight from '@astrojs/starlight';
|
||||||
|
import { defineConfig } from 'astro/config';
|
||||||
|
import starlightAutoSidebar from 'starlight-auto-sidebar';
|
||||||
|
|
||||||
|
import { version } from '../package.json';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://sharp.pixelplumbing.com',
|
site: 'https://sharp.pixelplumbing.com',
|
||||||
@@ -68,12 +71,20 @@ export default defineConfig({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ label: 'Performance', slug: 'performance' },
|
{ label: 'Performance', slug: 'performance' },
|
||||||
{ label: 'Changelog', slug: 'changelog' }
|
{
|
||||||
|
label: 'Changelog',
|
||||||
|
collapsed: true,
|
||||||
|
autogenerate: { directory: 'changelog' }
|
||||||
|
}
|
||||||
],
|
],
|
||||||
social: [
|
social: [
|
||||||
{ icon: 'openCollective', label: 'Open Collective', href: 'https://opencollective.com/libvips' },
|
{ icon: 'openCollective', label: 'Open Collective', href: 'https://opencollective.com/libvips' },
|
||||||
{ icon: 'github', label: 'GitHub', href: 'https://github.com/lovell/sharp' }
|
{ icon: 'github', label: 'GitHub', href: 'https://github.com/lovell/sharp' }
|
||||||
]
|
],
|
||||||
|
plugins: [starlightAutoSidebar()]
|
||||||
})
|
})
|
||||||
]
|
],
|
||||||
|
redirects: {
|
||||||
|
'/changelog': `/changelog/v${version}`
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// 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';
|
*/
|
||||||
|
|
||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/starlight": "^0.34.3",
|
"@astrojs/starlight": "^0.37.1",
|
||||||
"astro": "^5.7.13"
|
"astro": "^5.16.6",
|
||||||
|
"jsdoc-to-markdown": "^9.1.3",
|
||||||
|
"starlight-auto-sidebar": "^0.1.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,3 +323,9 @@ GitHub: https://github.com/hans00
|
|||||||
|
|
||||||
Name: Thibaut Patel
|
Name: Thibaut Patel
|
||||||
GitHub: https://github.com/tpatel
|
GitHub: https://github.com/tpatel
|
||||||
|
|
||||||
|
Name: Maël Nison
|
||||||
|
GitHub: https://github.com/arcanis
|
||||||
|
|
||||||
|
Name: Dmytro Tiapukhin
|
||||||
|
GitHub: https://github.com/eddienubes
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { defineCollection } from 'astro:content';
|
import { defineCollection } from 'astro:content';
|
||||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||||
import { docsSchema } from '@astrojs/starlight/schema';
|
import { docsSchema } from '@astrojs/starlight/schema';
|
||||||
|
import { autoSidebarLoader } from 'starlight-auto-sidebar/loader'
|
||||||
|
import { autoSidebarSchema } from 'starlight-auto-sidebar/schema'
|
||||||
|
|
||||||
export const collections = {
|
export const collections = {
|
||||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||||
|
autoSidebar: defineCollection({ loader: autoSidebarLoader(), schema: autoSidebarSchema() })
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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.
|
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**
|
**Example**
|
||||||
@@ -61,6 +61,8 @@ const rgba = await sharp(rgb)
|
|||||||
|
|
||||||
Extract a single channel from a multi-channel image.
|
Extract a single channel from a multi-channel image.
|
||||||
|
|
||||||
|
The output colourspace will be either `b-w` (8-bit) or `grey16` (16-bit).
|
||||||
|
|
||||||
|
|
||||||
**Throws**:
|
**Throws**:
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ as defined by [toColourspace](#tocolourspace).
|
|||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [colourspace] | <code>string</code> | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://github.com/libvips/libvips/blob/41cff4e9d0838498487a00623462204eb10ee5b8/libvips/iofuncs/enumtypes.c#L774) |
|
| [colourspace] | <code>string</code> | pipeline colourspace e.g. `rgb16`, `scrgb`, `lab`, `grey16` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
@@ -123,7 +123,7 @@ By default output image will be web-friendly sRGB, with additional channels inte
|
|||||||
|
|
||||||
| Param | Type | Description |
|
| Param | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [colourspace] | <code>string</code> | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://github.com/libvips/libvips/blob/3c0bfdf74ce1dc37a6429bed47fa76f16e2cd70a/libvips/iofuncs/enumtypes.c#L777-L794) |
|
| [colourspace] | <code>string</code> | output colourspace e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html) |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`,
|
|||||||
`hard-light`, `soft-light`, `difference`, `exclusion`.
|
`hard-light`, `soft-light`, `difference`, `exclusion`.
|
||||||
|
|
||||||
More information about blend modes can be found at
|
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/
|
and https://www.cairographics.org/operators/
|
||||||
|
|
||||||
|
|
||||||
@@ -64,8 +64,8 @@ and https://www.cairographics.org/operators/
|
|||||||
| [images[].raw.height] | <code>Number</code> | | |
|
| [images[].raw.height] | <code>Number</code> | | |
|
||||||
| [images[].raw.channels] | <code>Number</code> | | |
|
| [images[].raw.channels] | <code>Number</code> | | |
|
||||||
| [images[].animated] | <code>boolean</code> | <code>false</code> | Set to `true` to read all frames/pages of an animated image. |
|
| [images[].animated] | <code>boolean</code> | <code>false</code> | Set to `true` to read all frames/pages of an animated image. |
|
||||||
| [images[].failOn] | <code>string</code> | <code>"'warning'"</code> | @see [constructor parameters](/api-constructor#parameters) |
|
| [images[].failOn] | <code>string</code> | <code>"'warning'"</code> | @see [constructor parameters](/api-constructor/) |
|
||||||
| [images[].limitInputPixels] | <code>number</code> \| <code>boolean</code> | <code>268402689</code> | @see [constructor parameters](/api-constructor#parameters) |
|
| [images[].limitInputPixels] | <code>number</code> \| <code>boolean</code> | <code>268402689</code> | @see [constructor parameters](/api-constructor/) |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ It does not take into consideration any operations to be applied to the output i
|
|||||||
such as resize or rotate.
|
such as resize or rotate.
|
||||||
|
|
||||||
Dimensions in the response will respect the `page` and `pages` properties of the
|
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.
|
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
|
- `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)
|
- `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)
|
- `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
|
- `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
|
- `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
|
- `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
|
- `isProgressive`: Boolean indicating whether the image is interlaced using a progressive scan
|
||||||
@@ -50,6 +50,7 @@ A `Promise` is returned when `callback` is not provided.
|
|||||||
- `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
|
- `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
|
||||||
- `formatMagick`: String containing format for images loaded via *magick
|
- `formatMagick`: String containing format for images loaded via *magick
|
||||||
- `comments`: Array of keyword/text pairs representing PNG text blocks, if present.
|
- `comments`: Array of keyword/text pairs representing PNG text blocks, if present.
|
||||||
|
- `gainMap.image`: HDR gain map, if present, as compressed JPEG image.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ inputStream
|
|||||||
|
|
||||||
|
|
||||||
## sharpen
|
## sharpen
|
||||||
> sharpen([options], [flat], [jagged]) ⇒ <code>Sharp</code>
|
> sharpen([options]) ⇒ <code>Sharp</code>
|
||||||
|
|
||||||
Sharpen the image.
|
Sharpen the image.
|
||||||
|
|
||||||
@@ -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.
|
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.
|
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**:
|
**Throws**:
|
||||||
@@ -189,15 +189,13 @@ See [libvips sharpen](https://www.libvips.org/API/current/libvips-convolution.ht
|
|||||||
|
|
||||||
| Param | Type | Default | Description |
|
| Param | Type | Default | Description |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| [options] | <code>Object</code> \| <code>number</code> | | if present, is an Object with attributes |
|
| [options] | <code>Object</code> | | if present, is an Object with attributes |
|
||||||
| [options.sigma] | <code>number</code> | | the sigma of the Gaussian mask, where `sigma = 1 + radius / 2`, between 0.000001 and 10 |
|
| [options.sigma] | <code>number</code> | | the sigma of the Gaussian mask, where `sigma = 1 + radius / 2`, between 0.000001 and 10 |
|
||||||
| [options.m1] | <code>number</code> | <code>1.0</code> | the level of sharpening to apply to "flat" areas, between 0 and 1000000 |
|
| [options.m1] | <code>number</code> | <code>1.0</code> | the level of sharpening to apply to "flat" areas, between 0 and 1000000 |
|
||||||
| [options.m2] | <code>number</code> | <code>2.0</code> | the level of sharpening to apply to "jagged" areas, between 0 and 1000000 |
|
| [options.m2] | <code>number</code> | <code>2.0</code> | the level of sharpening to apply to "jagged" areas, between 0 and 1000000 |
|
||||||
| [options.x1] | <code>number</code> | <code>2.0</code> | threshold between "flat" and "jagged", between 0 and 1000000 |
|
| [options.x1] | <code>number</code> | <code>2.0</code> | threshold between "flat" and "jagged", between 0 and 1000000 |
|
||||||
| [options.y2] | <code>number</code> | <code>10.0</code> | maximum amount of brightening, between 0 and 1000000 |
|
| [options.y2] | <code>number</code> | <code>10.0</code> | maximum amount of brightening, between 0 and 1000000 |
|
||||||
| [options.y3] | <code>number</code> | <code>20.0</code> | maximum amount of darkening, between 0 and 1000000 |
|
| [options.y3] | <code>number</code> | <code>20.0</code> | maximum amount of darkening, between 0 and 1000000 |
|
||||||
| [flat] | <code>number</code> | | (deprecated) see `options.m1`. |
|
|
||||||
| [jagged] | <code>number</code> | | (deprecated) see `options.m2`. |
|
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
@@ -360,8 +358,6 @@ with all white pixel values made fully transparent.
|
|||||||
|
|
||||||
Existing alpha channel values for non-white pixels remain unchanged.
|
Existing alpha channel values for non-white pixels remain unchanged.
|
||||||
|
|
||||||
This feature is experimental and the API may change.
|
|
||||||
|
|
||||||
|
|
||||||
**Since**: 0.32.1
|
**Since**: 0.32.1
|
||||||
**Example**
|
**Example**
|
||||||
|
|||||||
@@ -117,6 +117,38 @@ await sharp(pixelArray, { raw: { width, height, channels } })
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## toUint8Array
|
||||||
|
> toUint8Array() ⇒ <code>Promise.<{data: Uint8Array, info: Object}></code>
|
||||||
|
|
||||||
|
Write output to a `Uint8Array` backed by a transferable `ArrayBuffer`.
|
||||||
|
JPEG, PNG, WebP, AVIF, TIFF, GIF and raw pixel data output are supported.
|
||||||
|
|
||||||
|
Use [toFormat](#toformat) or one of the format-specific functions such as [jpeg](#jpeg), [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 [keepExif](#keepexif) and similar methods for control over this.
|
||||||
|
|
||||||
|
Resolves with an `Object` containing:
|
||||||
|
- `data` is the output image as a `Uint8Array` backed by a transferable `ArrayBuffer`.
|
||||||
|
- `info` contains properties relating to the output image such as `width` and `height`.
|
||||||
|
|
||||||
|
|
||||||
|
**Since**: v0.35.0
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
const { data, info } = await sharp(input).toUint8Array();
|
||||||
|
```
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
const { data } = await sharp(input)
|
||||||
|
.avif()
|
||||||
|
.toUint8Array();
|
||||||
|
const base64String = data.toBase64();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## keepExif
|
## keepExif
|
||||||
> keepExif() ⇒ <code>Sharp</code>
|
> keepExif() ⇒ <code>Sharp</code>
|
||||||
|
|
||||||
@@ -201,7 +233,7 @@ const dataWithMergedExif = await sharp(inputWithExif)
|
|||||||
|
|
||||||
Keep ICC profile from the input image in the output image.
|
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
|
**Since**: 0.33.0
|
||||||
@@ -211,6 +243,14 @@ const outputWithIccProfile = await sharp(inputWithIccProfile)
|
|||||||
.keepIccProfile()
|
.keepIccProfile()
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
```
|
```
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
const cmykOutputWithIccProfile = await sharp(cmykInputWithIccProfile)
|
||||||
|
.pipelineColourspace('cmyk')
|
||||||
|
.toColourspace('cmyk')
|
||||||
|
.keepIccProfile()
|
||||||
|
.toBuffer();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## withIccProfile
|
## withIccProfile
|
||||||
@@ -242,6 +282,27 @@ const outputWithP3 = await sharp(input)
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## withGainMap
|
||||||
|
> withGainMap() ⇒ <code>Sharp</code>
|
||||||
|
|
||||||
|
If the input contains gain map metadata, use it to convert the main image to HDR (High Dynamic Range) before further processing.
|
||||||
|
The input gain map is discarded.
|
||||||
|
|
||||||
|
If the output is JPEG, generate and attach a new ISO 21496-1 gain map.
|
||||||
|
JPEG output options other than `quality` are ignored.
|
||||||
|
|
||||||
|
This feature is experimental and the API may change.
|
||||||
|
|
||||||
|
|
||||||
|
**Since**: 0.35.0
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
const outputWithGainMap = await sharp(inputWithGainMap)
|
||||||
|
.withGainMap()
|
||||||
|
.toBuffer();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## keepXmp
|
## keepXmp
|
||||||
> keepXmp() ⇒ <code>Sharp</code>
|
> keepXmp() ⇒ <code>Sharp</code>
|
||||||
|
|
||||||
@@ -430,7 +491,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.
|
Set `palette` to `true` for slower, indexed PNG output.
|
||||||
|
|
||||||
For 16 bits per pixel output, convert to `rgb16` via
|
For 16 bits per pixel output, convert to `rgb16` via
|
||||||
[toColourspace](/api-colour#tocolourspace).
|
[toColourspace](/api-colour/#tocolourspace).
|
||||||
|
|
||||||
|
|
||||||
**Throws**:
|
**Throws**:
|
||||||
@@ -502,6 +563,7 @@ Use these WebP options for output image.
|
|||||||
| [options.delay] | <code>number</code> \| <code>Array.<number></code> | | delay(s) between animation frames (in milliseconds) |
|
| [options.delay] | <code>number</code> \| <code>Array.<number></code> | | delay(s) between animation frames (in milliseconds) |
|
||||||
| [options.minSize] | <code>boolean</code> | <code>false</code> | prevent use of animation key frames to minimise file size (slow) |
|
| [options.minSize] | <code>boolean</code> | <code>false</code> | prevent use of animation key frames to minimise file size (slow) |
|
||||||
| [options.mixed] | <code>boolean</code> | <code>false</code> | allow mixture of lossy and lossless animation frames (slow) |
|
| [options.mixed] | <code>boolean</code> | <code>false</code> | allow mixture of lossy and lossless animation frames (slow) |
|
||||||
|
| [options.exact] | <code>boolean</code> | <code>false</code> | preserve the colour data in transparent pixels |
|
||||||
| [options.force] | <code>boolean</code> | <code>true</code> | force WebP output, otherwise attempt to use input format |
|
| [options.force] | <code>boolean</code> | <code>true</code> | force WebP output, otherwise attempt to use input format |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
@@ -589,7 +651,7 @@ Use these JP2 options for output image.
|
|||||||
|
|
||||||
Requires libvips compiled with support for OpenJPEG.
|
Requires libvips compiled with support for OpenJPEG.
|
||||||
The prebuilt binaries do not include this - see
|
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**:
|
**Throws**:
|
||||||
@@ -646,6 +708,7 @@ instead of providing `xres` and `yres` in pixels/mm.
|
|||||||
| [options.quality] | <code>number</code> | <code>80</code> | quality, integer 1-100 |
|
| [options.quality] | <code>number</code> | <code>80</code> | quality, integer 1-100 |
|
||||||
| [options.force] | <code>boolean</code> | <code>true</code> | force TIFF output, otherwise attempt to use input format |
|
| [options.force] | <code>boolean</code> | <code>true</code> | force TIFF output, otherwise attempt to use input format |
|
||||||
| [options.compression] | <code>string</code> | <code>"'jpeg'"</code> | compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k |
|
| [options.compression] | <code>string</code> | <code>"'jpeg'"</code> | compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k |
|
||||||
|
| [options.bigtiff] | <code>boolean</code> | <code>false</code> | use BigTIFF variant (has no effect when compression is none) |
|
||||||
| [options.predictor] | <code>string</code> | <code>"'horizontal'"</code> | compression predictor options: none, horizontal, float |
|
| [options.predictor] | <code>string</code> | <code>"'horizontal'"</code> | compression predictor options: none, horizontal, float |
|
||||||
| [options.pyramid] | <code>boolean</code> | <code>false</code> | write an image pyramid |
|
| [options.pyramid] | <code>boolean</code> | <code>false</code> | write an image pyramid |
|
||||||
| [options.tile] | <code>boolean</code> | <code>false</code> | write a tiled tiff |
|
| [options.tile] | <code>boolean</code> | <code>false</code> | write a tiled tiff |
|
||||||
@@ -654,7 +717,7 @@ instead of providing `xres` and `yres` in pixels/mm.
|
|||||||
| [options.xres] | <code>number</code> | <code>1.0</code> | horizontal resolution in pixels/mm |
|
| [options.xres] | <code>number</code> | <code>1.0</code> | horizontal resolution in pixels/mm |
|
||||||
| [options.yres] | <code>number</code> | <code>1.0</code> | vertical resolution in pixels/mm |
|
| [options.yres] | <code>number</code> | <code>1.0</code> | vertical resolution in pixels/mm |
|
||||||
| [options.resolutionUnit] | <code>string</code> | <code>"'inch'"</code> | resolution unit options: inch, cm |
|
| [options.resolutionUnit] | <code>string</code> | <code>"'inch'"</code> | resolution unit options: inch, cm |
|
||||||
| [options.bitdepth] | <code>number</code> | <code>8</code> | reduce bitdepth to 1, 2 or 4 bit |
|
| [options.bitdepth] | <code>number</code> | <code>0</code> | reduce bitdepth to 1, 2 or 4 bit |
|
||||||
| [options.miniswhite] | <code>boolean</code> | <code>false</code> | write 1-bit images as miniswhite |
|
| [options.miniswhite] | <code>boolean</code> | <code>false</code> | write 1-bit images as miniswhite |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
@@ -678,8 +741,7 @@ Use these AVIF options for output image.
|
|||||||
AVIF image sequences are not supported.
|
AVIF image sequences are not supported.
|
||||||
Prebuilt binaries support a bitdepth of 8 only.
|
Prebuilt binaries support a bitdepth of 8 only.
|
||||||
|
|
||||||
This feature is experimental on the Windows ARM64 platform
|
When using Windows ARM64, this feature requires a CPU with ARM64v8.4 or later.
|
||||||
and requires a CPU with ARM64v8.4 or later.
|
|
||||||
|
|
||||||
|
|
||||||
**Throws**:
|
**Throws**:
|
||||||
@@ -696,6 +758,7 @@ and requires a CPU with ARM64v8.4 or later.
|
|||||||
| [options.effort] | <code>number</code> | <code>4</code> | CPU effort, between 0 (fastest) and 9 (slowest) |
|
| [options.effort] | <code>number</code> | <code>4</code> | CPU effort, between 0 (fastest) and 9 (slowest) |
|
||||||
| [options.chromaSubsampling] | <code>string</code> | <code>"'4:4:4'"</code> | set to '4:2:0' to use chroma subsampling |
|
| [options.chromaSubsampling] | <code>string</code> | <code>"'4:4:4'"</code> | set to '4:2:0' to use chroma subsampling |
|
||||||
| [options.bitdepth] | <code>number</code> | <code>8</code> | set bitdepth to 8, 10 or 12 bit |
|
| [options.bitdepth] | <code>number</code> | <code>8</code> | set bitdepth to 8, 10 or 12 bit |
|
||||||
|
| [options.tune] | <code>string</code> | <code>"'iq'"</code> | tune output for a quality metric, one of 'iq' (default), 'ssim' (default when lossless) or 'psnr' |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
@@ -735,6 +798,7 @@ globally-installed libvips compiled with support for libheif, libde265 and x265.
|
|||||||
| [options.effort] | <code>number</code> | <code>4</code> | CPU effort, between 0 (fastest) and 9 (slowest) |
|
| [options.effort] | <code>number</code> | <code>4</code> | CPU effort, between 0 (fastest) and 9 (slowest) |
|
||||||
| [options.chromaSubsampling] | <code>string</code> | <code>"'4:4:4'"</code> | set to '4:2:0' to use chroma subsampling |
|
| [options.chromaSubsampling] | <code>string</code> | <code>"'4:4:4'"</code> | set to '4:2:0' to use chroma subsampling |
|
||||||
| [options.bitdepth] | <code>number</code> | <code>8</code> | set bitdepth to 8, 10 or 12 bit |
|
| [options.bitdepth] | <code>number</code> | <code>8</code> | set bitdepth to 8, 10 or 12 bit |
|
||||||
|
| [options.tune] | <code>string</code> | <code>"'ssim'"</code> | tune output for a quality metric, one of 'ssim' (default), 'psnr' or 'iq' |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
@@ -753,7 +817,7 @@ This feature is experimental, please do not use in production systems.
|
|||||||
|
|
||||||
Requires libvips compiled with support for libjxl.
|
Requires libvips compiled with support for libjxl.
|
||||||
The prebuilt binaries do not include this - see
|
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**:
|
**Throws**:
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ The `info` response Object will contain `trimOffsetLeft` and `trimOffsetTop` pro
|
|||||||
| [options.background] | <code>string</code> \| <code>Object</code> | <code>"'top-left pixel'"</code> | Background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to that of the top-left pixel. |
|
| [options.background] | <code>string</code> \| <code>Object</code> | <code>"'top-left pixel'"</code> | Background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to that of the top-left pixel. |
|
||||||
| [options.threshold] | <code>number</code> | <code>10</code> | Allowed difference from the above colour, a positive number. |
|
| [options.threshold] | <code>number</code> | <code>10</code> | Allowed difference from the above colour, a positive number. |
|
||||||
| [options.lineArt] | <code>boolean</code> | <code>false</code> | Does the input more closely resemble line art (e.g. vector) rather than being photographic? |
|
| [options.lineArt] | <code>boolean</code> | <code>false</code> | Does the input more closely resemble line art (e.g. vector) rather than being photographic? |
|
||||||
|
| [options.margin] | <code>number</code> | <code>0</code> | Leave a margin around trimmed content, value is in pixels. |
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```js
|
```js
|
||||||
@@ -320,4 +321,13 @@ const output = await sharp(input)
|
|||||||
threshold: 42,
|
threshold: 42,
|
||||||
})
|
})
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
|
```
|
||||||
|
**Example**
|
||||||
|
```js
|
||||||
|
// Trim image leaving (up to) a 10 pixel margin around the trimmed content.
|
||||||
|
const output = await sharp(input)
|
||||||
|
.trim({
|
||||||
|
margin: 10
|
||||||
|
})
|
||||||
|
.toBuffer();
|
||||||
```
|
```
|
||||||
@@ -114,7 +114,7 @@ e.g. libaom manages its own 4 threads when encoding AVIF images,
|
|||||||
and these are independent of the value set here.
|
and these are independent of the value set here.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
Further [control over performance](/performance) is available.
|
Further [control over performance](/performance/) is available.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1
docs/src/content/docs/changelog/_meta.yml
Normal file
1
docs/src/content/docs/changelog/_meta.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sort: reverse-slug
|
||||||
22
docs/src/content/docs/changelog/v0.10.0.md
Normal file
22
docs/src/content/docs/changelog/v0.10.0.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.10.1.md
Normal file
12
docs/src/content/docs/changelog/v0.10.1.md
Normal file
@@ -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)
|
||||||
30
docs/src/content/docs/changelog/v0.11.0.md
Normal file
30
docs/src/content/docs/changelog/v0.11.0.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.11.1.md
Normal file
12
docs/src/content/docs/changelog/v0.11.1.md
Normal file
@@ -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)
|
||||||
10
docs/src/content/docs/changelog/v0.11.2.md
Normal file
10
docs/src/content/docs/changelog/v0.11.2.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.11.3.md
Normal file
8
docs/src/content/docs/changelog/v0.11.3.md
Normal file
@@ -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)
|
||||||
16
docs/src/content/docs/changelog/v0.11.4.md
Normal file
16
docs/src/content/docs/changelog/v0.11.4.md
Normal file
@@ -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)
|
||||||
38
docs/src/content/docs/changelog/v0.12.0.md
Normal file
38
docs/src/content/docs/changelog/v0.12.0.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.12.1.md
Normal file
15
docs/src/content/docs/changelog/v0.12.1.md
Normal file
@@ -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.
|
||||||
20
docs/src/content/docs/changelog/v0.12.2.md
Normal file
20
docs/src/content/docs/changelog/v0.12.2.md
Normal file
@@ -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)
|
||||||
47
docs/src/content/docs/changelog/v0.13.0.md
Normal file
47
docs/src/content/docs/changelog/v0.13.0.md
Normal file
@@ -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.
|
||||||
8
docs/src/content/docs/changelog/v0.13.1.md
Normal file
8
docs/src/content/docs/changelog/v0.13.1.md
Normal file
@@ -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)
|
||||||
39
docs/src/content/docs/changelog/v0.14.0.md
Normal file
39
docs/src/content/docs/changelog/v0.14.0.md
Normal file
@@ -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)
|
||||||
26
docs/src/content/docs/changelog/v0.14.1.md
Normal file
26
docs/src/content/docs/changelog/v0.14.1.md
Normal file
@@ -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)
|
||||||
20
docs/src/content/docs/changelog/v0.15.0.md
Normal file
20
docs/src/content/docs/changelog/v0.15.0.md
Normal file
@@ -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)
|
||||||
68
docs/src/content/docs/changelog/v0.15.1.md
Normal file
68
docs/src/content/docs/changelog/v0.15.1.md
Normal file
@@ -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)
|
||||||
42
docs/src/content/docs/changelog/v0.16.0.md
Normal file
42
docs/src/content/docs/changelog/v0.16.0.md
Normal file
@@ -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)
|
||||||
21
docs/src/content/docs/changelog/v0.16.1.md
Normal file
21
docs/src/content/docs/changelog/v0.16.1.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.16.2.md
Normal file
8
docs/src/content/docs/changelog/v0.16.2.md
Normal file
@@ -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)
|
||||||
39
docs/src/content/docs/changelog/v0.17.0.md
Normal file
39
docs/src/content/docs/changelog/v0.17.0.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.17.1.md
Normal file
15
docs/src/content/docs/changelog/v0.17.1.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.17.2.md
Normal file
12
docs/src/content/docs/changelog/v0.17.2.md
Normal file
@@ -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)
|
||||||
20
docs/src/content/docs/changelog/v0.17.3.md
Normal file
20
docs/src/content/docs/changelog/v0.17.3.md
Normal file
@@ -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)
|
||||||
60
docs/src/content/docs/changelog/v0.18.0.md
Normal file
60
docs/src/content/docs/changelog/v0.18.0.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.18.1.md
Normal file
8
docs/src/content/docs/changelog/v0.18.1.md
Normal file
@@ -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)
|
||||||
19
docs/src/content/docs/changelog/v0.18.2.md
Normal file
19
docs/src/content/docs/changelog/v0.18.2.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.18.3.md
Normal file
12
docs/src/content/docs/changelog/v0.18.3.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.18.4.md
Normal file
8
docs/src/content/docs/changelog/v0.18.4.md
Normal file
@@ -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)
|
||||||
46
docs/src/content/docs/changelog/v0.19.0.md
Normal file
46
docs/src/content/docs/changelog/v0.19.0.md
Normal file
@@ -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.
|
||||||
16
docs/src/content/docs/changelog/v0.19.1.md
Normal file
16
docs/src/content/docs/changelog/v0.19.1.md
Normal file
@@ -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)
|
||||||
7
docs/src/content/docs/changelog/v0.20.0.md
Normal file
7
docs/src/content/docs/changelog/v0.20.0.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.20.1.md
Normal file
15
docs/src/content/docs/changelog/v0.20.1.md
Normal file
@@ -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)
|
||||||
20
docs/src/content/docs/changelog/v0.20.2.md
Normal file
20
docs/src/content/docs/changelog/v0.20.2.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.20.3.md
Normal file
8
docs/src/content/docs/changelog/v0.20.3.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.20.4.md
Normal file
12
docs/src/content/docs/changelog/v0.20.4.md
Normal file
@@ -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)
|
||||||
8
docs/src/content/docs/changelog/v0.20.5.md
Normal file
8
docs/src/content/docs/changelog/v0.20.5.md
Normal file
@@ -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)
|
||||||
33
docs/src/content/docs/changelog/v0.20.6.md
Normal file
33
docs/src/content/docs/changelog/v0.20.6.md
Normal file
@@ -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.
|
||||||
7
docs/src/content/docs/changelog/v0.20.7.md
Normal file
7
docs/src/content/docs/changelog/v0.20.7.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.20.8.md
Normal file
12
docs/src/content/docs/changelog/v0.20.8.md
Normal file
@@ -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)
|
||||||
39
docs/src/content/docs/changelog/v0.21.0.md
Normal file
39
docs/src/content/docs/changelog/v0.21.0.md
Normal file
@@ -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)
|
||||||
31
docs/src/content/docs/changelog/v0.21.1.md
Normal file
31
docs/src/content/docs/changelog/v0.21.1.md
Normal file
@@ -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)
|
||||||
27
docs/src/content/docs/changelog/v0.21.2.md
Normal file
27
docs/src/content/docs/changelog/v0.21.2.md
Normal file
@@ -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)
|
||||||
9
docs/src/content/docs/changelog/v0.21.3.md
Normal file
9
docs/src/content/docs/changelog/v0.21.3.md
Normal file
@@ -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)
|
||||||
20
docs/src/content/docs/changelog/v0.22.0.md
Normal file
20
docs/src/content/docs/changelog/v0.22.0.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.22.1.md
Normal file
15
docs/src/content/docs/changelog/v0.22.1.md
Normal file
@@ -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)
|
||||||
32
docs/src/content/docs/changelog/v0.23.0.md
Normal file
32
docs/src/content/docs/changelog/v0.23.0.md
Normal file
@@ -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)
|
||||||
24
docs/src/content/docs/changelog/v0.23.1.md
Normal file
24
docs/src/content/docs/changelog/v0.23.1.md
Normal file
@@ -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.
|
||||||
12
docs/src/content/docs/changelog/v0.23.2.md
Normal file
12
docs/src/content/docs/changelog/v0.23.2.md
Normal file
@@ -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)
|
||||||
18
docs/src/content/docs/changelog/v0.23.3.md
Normal file
18
docs/src/content/docs/changelog/v0.23.3.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.23.4.md
Normal file
12
docs/src/content/docs/changelog/v0.23.4.md
Normal file
@@ -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)
|
||||||
28
docs/src/content/docs/changelog/v0.24.0.md
Normal file
28
docs/src/content/docs/changelog/v0.24.0.md
Normal file
@@ -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)
|
||||||
10
docs/src/content/docs/changelog/v0.24.1.md
Normal file
10
docs/src/content/docs/changelog/v0.24.1.md
Normal file
@@ -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)
|
||||||
18
docs/src/content/docs/changelog/v0.25.0.md
Normal file
18
docs/src/content/docs/changelog/v0.25.0.md
Normal file
@@ -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)
|
||||||
7
docs/src/content/docs/changelog/v0.25.1.md
Normal file
7
docs/src/content/docs/changelog/v0.25.1.md
Normal file
@@ -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)
|
||||||
19
docs/src/content/docs/changelog/v0.25.2.md
Normal file
19
docs/src/content/docs/changelog/v0.25.2.md
Normal file
@@ -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)
|
||||||
14
docs/src/content/docs/changelog/v0.25.3.md
Normal file
14
docs/src/content/docs/changelog/v0.25.3.md
Normal file
@@ -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)
|
||||||
25
docs/src/content/docs/changelog/v0.25.4.md
Normal file
25
docs/src/content/docs/changelog/v0.25.4.md
Normal file
@@ -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)
|
||||||
33
docs/src/content/docs/changelog/v0.26.0.md
Normal file
33
docs/src/content/docs/changelog/v0.26.0.md
Normal file
@@ -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)
|
||||||
22
docs/src/content/docs/changelog/v0.26.1.md
Normal file
22
docs/src/content/docs/changelog/v0.26.1.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.26.2.md
Normal file
15
docs/src/content/docs/changelog/v0.26.2.md
Normal file
@@ -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)
|
||||||
12
docs/src/content/docs/changelog/v0.26.3.md
Normal file
12
docs/src/content/docs/changelog/v0.26.3.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.27.0.md
Normal file
15
docs/src/content/docs/changelog/v0.27.0.md
Normal file
@@ -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)
|
||||||
19
docs/src/content/docs/changelog/v0.27.1.md
Normal file
19
docs/src/content/docs/changelog/v0.27.1.md
Normal file
@@ -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)
|
||||||
20
docs/src/content/docs/changelog/v0.27.2.md
Normal file
20
docs/src/content/docs/changelog/v0.27.2.md
Normal file
@@ -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)
|
||||||
32
docs/src/content/docs/changelog/v0.28.0.md
Normal file
32
docs/src/content/docs/changelog/v0.28.0.md
Normal file
@@ -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)
|
||||||
15
docs/src/content/docs/changelog/v0.28.1.md
Normal file
15
docs/src/content/docs/changelog/v0.28.1.md
Normal file
@@ -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)
|
||||||
26
docs/src/content/docs/changelog/v0.28.2.md
Normal file
26
docs/src/content/docs/changelog/v0.28.2.md
Normal file
@@ -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)
|
||||||
13
docs/src/content/docs/changelog/v0.28.3.md
Normal file
13
docs/src/content/docs/changelog/v0.28.3.md
Normal file
@@ -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)
|
||||||
35
docs/src/content/docs/changelog/v0.29.0.md
Normal file
35
docs/src/content/docs/changelog/v0.29.0.md
Normal file
@@ -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)
|
||||||
30
docs/src/content/docs/changelog/v0.29.1.md
Normal file
30
docs/src/content/docs/changelog/v0.29.1.md
Normal file
@@ -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)
|
||||||
22
docs/src/content/docs/changelog/v0.29.2.md
Normal file
22
docs/src/content/docs/changelog/v0.29.2.md
Normal file
@@ -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)
|
||||||
11
docs/src/content/docs/changelog/v0.29.3.md
Normal file
11
docs/src/content/docs/changelog/v0.29.3.md
Normal file
@@ -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)
|
||||||
48
docs/src/content/docs/changelog/v0.30.0.md
Normal file
48
docs/src/content/docs/changelog/v0.30.0.md
Normal file
@@ -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)
|
||||||
19
docs/src/content/docs/changelog/v0.30.1.md
Normal file
19
docs/src/content/docs/changelog/v0.30.1.md
Normal file
@@ -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)
|
||||||
17
docs/src/content/docs/changelog/v0.30.2.md
Normal file
17
docs/src/content/docs/changelog/v0.30.2.md
Normal file
@@ -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)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user