Docs: compatible with Node-API v9 runtimes

This commit is contained in:
Lovell Fuller 2023-10-14 15:46:02 +01:00
parent 337ce7b1c2
commit 0107a4de81
3 changed files with 23 additions and 7 deletions

View File

@ -2,10 +2,14 @@
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/image/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
The typical use case for this high speed Node.js module
The typical use case for this high speed Node-API module
is to convert large images in common formats to
smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.
It can be used with all JavaScript runtimes
that provide support for Node-API v9, including
Node.js >= 18.17.0, Deno and Bun.
Resizing an image is typically 4x-5x faster than using the
quickest ImageMagick and GraphicsMagick settings
due to its use of [libvips](https://github.com/libvips/libvips).
@ -16,7 +20,7 @@ Lanczos resampling ensures quality is not sacrificed for speed.
As well as image resizing, operations such as
rotation, extraction, compositing and gamma correction are available.
Most modern macOS, Windows and Linux systems running Node.js >= 18.17.0
Most modern macOS, Windows and Linux systems
do not require any additional install or runtime dependencies.
## Documentation

View File

@ -2,10 +2,14 @@
<img src="https://cdn.jsdelivr.net/gh/lovell/sharp@main/docs/image/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
The typical use case for this high speed Node.js module
The typical use case for this high speed Node-API module
is to convert large images in common formats to
smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.
It can be used with all JavaScript runtimes
that provide support for Node-API v9, including
Node.js >= 18.17.0, Deno and Bun.
Resizing an image is typically 4x-5x faster than using the
quickest ImageMagick and GraphicsMagick settings
due to its use of [libvips](https://github.com/libvips/libvips).
@ -16,7 +20,7 @@ Lanczos resampling ensures quality is not sacrificed for speed.
As well as image resizing, operations such as
rotation, extraction, compositing and gamma correction are available.
Most modern macOS, Windows and Linux systems running Node.js >= 14.15.0
Most modern macOS, Windows and Linux systems
do not require any additional install or runtime dependencies.
### Formats

View File

@ -1,5 +1,7 @@
# Installation
Works with your choice of JavaScript package manager.
```sh
npm install sharp
```
@ -9,14 +11,20 @@ pnpm add sharp
```
```sh
yarn add sharp
yarn add sharp # v3 recommended, Plug'n'Play unsupported
```
Yarn Plug'n'Play is unsupported.
```sh
bun add sharp
```
```sh
deno run --allow-ffi ...
```
## Prerequisites
* Node.js >= 18.17.0
* Node-API v9 compatible runtime e.g. Node.js >= 18.17.0
## Prebuilt binaries