Add 'animated' constructor property as shortcut for 'pages'

Provides easier-to-understand API when handling animated images
This commit is contained in:
Lovell Fuller
2020-08-18 20:28:25 +01:00
parent b711661784
commit 4beae0de71
5 changed files with 28 additions and 0 deletions

View File

@@ -399,6 +399,7 @@ function webp (options) {
* @returns {Sharp}
* @throws {Error} Invalid options
*/
/* istanbul ignore next */
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');