From e1bc8674fdcc2599ba199bdb97227acd496104f7 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 21 Aug 2022 19:53:04 +0100 Subject: [PATCH] Docs: clarify composite operation ordering --- docs/api-composite.md | 3 +++ lib/composite.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/api-composite.md b/docs/api-composite.md index 70087eb7..f63e5864 100644 --- a/docs/api-composite.md +++ b/docs/api-composite.md @@ -7,6 +7,9 @@ Composite image(s) over the processed (resized, extracted etc.) image. The images to composite must be the same size or smaller than the processed image. If both `top` and `left` options are provided, they take precedence over `gravity`. +Any resize or rotate operations in the same processing pipeline +will always be applied to the input image before composition. + The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`, `dest`, `dest-over`, `dest-in`, `dest-out`, `dest-atop`, `xor`, `add`, `saturate`, `multiply`, `screen`, `overlay`, `darken`, `lighten`, diff --git a/lib/composite.js b/lib/composite.js index 8373767e..0cf71f5d 100644 --- a/lib/composite.js +++ b/lib/composite.js @@ -43,6 +43,9 @@ const blend = { * The images to composite must be the same size or smaller than the processed image. * If both `top` and `left` options are provided, they take precedence over `gravity`. * + * Any resize or rotate operations in the same processing pipeline + * will always be applied to the input image before composition. + * * The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`, * `dest`, `dest-over`, `dest-in`, `dest-out`, `dest-atop`, * `xor`, `add`, `saturate`, `multiply`, `screen`, `overlay`, `darken`, `lighten`,