From bbff1c222d60b5830a59dac1d436dc33acd04420 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 13 May 2020 16:01:00 +0100 Subject: [PATCH] Docs: clarify description of withMetadata Default and non-default behaviour was mixed in the same paragraph, leading to confusion about when an ICC profile might be expected. --- docs/api-output.md | 4 +++- lib/output.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/api-output.md b/docs/api-output.md index 194e8b73..05ee3d18 100644 --- a/docs/api-output.md +++ b/docs/api-output.md @@ -91,9 +91,11 @@ Returns **[Promise][5]<[Buffer][8]>** when no callback is provided ## withMetadata Include all metadata (EXIF, XMP, IPTC) from the input image in the output image. -The default behaviour, when `withMetadata` is not used, is to strip all metadata and convert to the device-independent sRGB colour space. This will also convert to and add a web-friendly sRGB ICC profile. +The default behaviour, when `withMetadata` is not used, is to convert to the device-independent +sRGB colour space and strip all metadata, including the removal of any ICC profile. + ### Parameters - `options` **[Object][6]?** diff --git a/lib/output.js b/lib/output.js index fe6128e8..1548b990 100644 --- a/lib/output.js +++ b/lib/output.js @@ -118,9 +118,11 @@ function toBuffer (options, callback) { /** * Include all metadata (EXIF, XMP, IPTC) from the input image in the output image. - * The default behaviour, when `withMetadata` is not used, is to strip all metadata and convert to the device-independent sRGB colour space. * This will also convert to and add a web-friendly sRGB ICC profile. * + * The default behaviour, when `withMetadata` is not used, is to convert to the device-independent + * sRGB colour space and strip all metadata, including the removal of any ICC profile. + * * @example * sharp('input.jpg') * .withMetadata()