From 9c877d93fa9f936bea4bd33841824c480460fbd8 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 27 Nov 2023 20:35:53 +0000 Subject: [PATCH] Docs: info about how animated images are loaded --- docs/api-constructor.md | 4 ++++ lib/constructor.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/api-constructor.md b/docs/api-constructor.md index e7f110562..8f670e9cd 100644 --- a/docs/api-constructor.md +++ b/docs/api-constructor.md @@ -17,6 +17,10 @@ Non-critical problems encountered during processing are emitted as `warning` eve Implements the [stream.Duplex](http://nodejs.org/api/stream.html#stream_class_stream_duplex) class. +When loading more than one page/frame of an animated image, +these are combined as a vertically-stacked "toilet roll" image +where the overall height is the `pageHeight` multiplied by the number of `pages`. + **Throws**: - Error Invalid parameters diff --git a/lib/constructor.js b/lib/constructor.js index 38151d8fd..7f4e80da0 100644 --- a/lib/constructor.js +++ b/lib/constructor.js @@ -22,6 +22,10 @@ const debuglog = util.debuglog('sharp'); * * Implements the [stream.Duplex](http://nodejs.org/api/stream.html#stream_class_stream_duplex) class. * + * When loading more than one page/frame of an animated image, + * these are combined as a vertically-stacked "toilet roll" image + * where the overall height is the `pageHeight` multiplied by the number of `pages`. + * * @constructs Sharp * * @emits Sharp#info