mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Docs: add avif and heif examples
This commit is contained in:
@@ -825,6 +825,16 @@ function tiff (options) {
|
||||
*
|
||||
* AVIF image sequences are not supported.
|
||||
*
|
||||
* @example
|
||||
* const data = await sharp(input)
|
||||
* .avif({ effort: 2 })
|
||||
* .toBuffer();
|
||||
*
|
||||
* @example
|
||||
* const data = await sharp(input)
|
||||
* .avif({ lossless: true })
|
||||
* .toBuffer();
|
||||
*
|
||||
* @since 0.27.0
|
||||
*
|
||||
* @param {Object} [options] - output options
|
||||
@@ -842,9 +852,14 @@ function avif (options) {
|
||||
/**
|
||||
* Use these HEIF options for output image.
|
||||
*
|
||||
* Support for patent-encumbered HEIC images requires the use of a
|
||||
* Support for patent-encumbered HEIC images using `hevc` compression requires the use of a
|
||||
* globally-installed libvips compiled with support for libheif, libde265 and x265.
|
||||
*
|
||||
* @example
|
||||
* const data = await sharp(input)
|
||||
* .heif({ compression: 'hevc' })
|
||||
* .toBuffer();
|
||||
*
|
||||
* @since 0.23.0
|
||||
*
|
||||
* @param {Object} [options] - output options
|
||||
|
||||
Reference in New Issue
Block a user