diff --git a/docs/api-output.md b/docs/api-output.md index 49cd12c7..5d9beb47 100644 --- a/docs/api-output.md +++ b/docs/api-output.md @@ -140,12 +140,18 @@ sharp('input.jpg') ``` **Example** ```js -// Set "IFD0-Copyright" in output EXIF metadata +// Set output EXIF metadata const data = await sharp(input) .withMetadata({ exif: { IFD0: { - Copyright: 'Wernham Hogg' + Copyright: 'The National Gallery' + }, + IFD3: { + GPSLatitudeRef: 'N', + GPSLatitude: '51/1 30/1 3230/100', + GPSLongitudeRef: 'W', + GPSLongitude: '0/1 7/1 4366/100' } } }) diff --git a/lib/output.js b/lib/output.js index 426af0b7..938a4d22 100644 --- a/lib/output.js +++ b/lib/output.js @@ -177,12 +177,18 @@ function toBuffer (options, callback) { * .then(info => { ... }); * * @example - * // Set "IFD0-Copyright" in output EXIF metadata + * // Set output EXIF metadata * const data = await sharp(input) * .withMetadata({ * exif: { * IFD0: { - * Copyright: 'Wernham Hogg' + * Copyright: 'The National Gallery' + * }, + * IFD3: { + * GPSLatitudeRef: 'N', + * GPSLatitude: '51/1 30/1 3230/100', + * GPSLongitudeRef: 'W', + * GPSLongitude: '0/1 7/1 4366/100' * } * } * })