mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Doc refresh and changelog entry for #2012
This commit is contained in:
@@ -387,7 +387,9 @@ function webp (options) {
|
||||
/**
|
||||
* Use these GIF options for output image.
|
||||
*
|
||||
* Requires a custom, globally-installed libvips compiled with support for imageMagick.
|
||||
* Requires libvips compiled with support for ImageMagick or GraphicsMagick.
|
||||
* The prebuilt binaries do not include this - see
|
||||
* {@link https://sharp.pixelplumbing.com/install#custom-libvips installing a custom libvips}.
|
||||
*
|
||||
* @param {Object} [options] - output options
|
||||
* @param {number} [options.pageHeight] - page height for animated output
|
||||
@@ -398,12 +400,16 @@ function webp (options) {
|
||||
* @throws {Error} Invalid options
|
||||
*/
|
||||
function gif (options) {
|
||||
if (!this.constructor.format.magick.output.buffer) {
|
||||
throw new Error('The gif operation requires libvips to have been installed with support for ImageMagick');
|
||||
}
|
||||
trySetAnimationOptions(options, this.options);
|
||||
return this._updateFormatOut('gif', options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set animation options if available.
|
||||
* @private
|
||||
*
|
||||
* @param {Object} [source] - output options
|
||||
* @param {number} [source.pageHeight] - page height for animated output
|
||||
|
||||
Reference in New Issue
Block a user