Skip to content

Commit

Permalink
Docs: clarify description of withMetadata
Browse files Browse the repository at this point in the history
Default and non-default behaviour was mixed in the same paragraph,
leading to confusion about when an ICC profile might be expected.
  • Loading branch information
lovell committed May 13, 2020
1 parent b534f99 commit bbff1c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/api-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]?**
Expand Down
4 changes: 3 additions & 1 deletion lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bbff1c2

Please sign in to comment.