mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Docs: fix example formatting, remove outdated warning
This commit is contained in:
parent
92399ee5e2
commit
4c3a8a7007
@ -147,8 +147,9 @@ const data = await sharp(input)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.toBuffer();
|
.toBuffer();
|
||||||
|
```
|
||||||
|
|
||||||
* @example
|
```javascript
|
||||||
// Set output metadata to 96 DPI
|
// Set output metadata to 96 DPI
|
||||||
const data = await sharp(input)
|
const data = await sharp(input)
|
||||||
.withMetadata({ density: 96 })
|
.withMetadata({ density: 96 })
|
||||||
@ -534,8 +535,6 @@ Use tile-based deep zoom (image pyramid) output.
|
|||||||
Set the format and options for tile images via the `toFormat`, `jpeg`, `png` or `webp` functions.
|
Set the format and options for tile images via the `toFormat`, `jpeg`, `png` or `webp` functions.
|
||||||
Use a `.zip` or `.szi` file extension with `toFile` to write to a compressed archive file format.
|
Use a `.zip` or `.szi` file extension with `toFile` to write to a compressed archive file format.
|
||||||
|
|
||||||
Warning: multiple sharp instances concurrently producing tile output can expose a possible race condition in some versions of libgsf.
|
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
* `options` **[Object][6]?**
|
* `options` **[Object][6]?**
|
||||||
|
@ -168,7 +168,7 @@ function toBuffer (options, callback) {
|
|||||||
* })
|
* })
|
||||||
* .toBuffer();
|
* .toBuffer();
|
||||||
*
|
*
|
||||||
* * @example
|
* @example
|
||||||
* // Set output metadata to 96 DPI
|
* // Set output metadata to 96 DPI
|
||||||
* const data = await sharp(input)
|
* const data = await sharp(input)
|
||||||
* .withMetadata({ density: 96 })
|
* .withMetadata({ density: 96 })
|
||||||
@ -911,8 +911,6 @@ function raw (options) {
|
|||||||
* Set the format and options for tile images via the `toFormat`, `jpeg`, `png` or `webp` functions.
|
* Set the format and options for tile images via the `toFormat`, `jpeg`, `png` or `webp` functions.
|
||||||
* Use a `.zip` or `.szi` file extension with `toFile` to write to a compressed archive file format.
|
* Use a `.zip` or `.szi` file extension with `toFile` to write to a compressed archive file format.
|
||||||
*
|
*
|
||||||
* Warning: multiple sharp instances concurrently producing tile output can expose a possible race condition in some versions of libgsf.
|
|
||||||
*
|
|
||||||
* @example
|
* @example
|
||||||
* sharp('input.tiff')
|
* sharp('input.tiff')
|
||||||
* .png()
|
* .png()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user