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.
This commit is contained in:
Lovell Fuller 2020-05-13 16:01:00 +01:00
parent b534f99870
commit bbff1c222d
2 changed files with 6 additions and 2 deletions

View File

@ -91,9 +91,11 @@ Returns **[Promise][5]<[Buffer][8]>** when no callback is provided
## withMetadata ## withMetadata
Include all metadata (EXIF, XMP, IPTC) from the input image in the output image. 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. 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 ### Parameters
- `options` **[Object][6]?** - `options` **[Object][6]?**

View File

@ -118,9 +118,11 @@ function toBuffer (options, callback) {
/** /**
* Include all metadata (EXIF, XMP, IPTC) from the input image in the output image. * 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. * 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 * @example
* sharp('input.jpg') * sharp('input.jpg')
* .withMetadata() * .withMetadata()