Provide XMP as a string, as well as a Buffer, where possible

This commit is contained in:
Lovell Fuller
2025-07-04 15:55:41 +01:00
parent 4e3f3792ad
commit 8ee8d273ee
5 changed files with 12 additions and 0 deletions

2
lib/index.d.ts vendored
View File

@@ -1254,6 +1254,8 @@ declare namespace sharp {
iptc?: Buffer | undefined;
/** Buffer containing raw XMP data, if present */
xmp?: Buffer | undefined;
/** String containing XMP data, if valid UTF-8 */
xmpAsString?: string | undefined;
/** Buffer containing raw TIFFTAG_PHOTOSHOP data, if present */
tifftagPhotoshop?: Buffer | undefined;
/** The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC) */

View File

@@ -605,6 +605,7 @@ function _isStreamInput () {
* - `icc`: Buffer containing raw [ICC](https://www.npmjs.com/package/icc) profile data, if present
* - `iptc`: Buffer containing raw IPTC data, if present
* - `xmp`: Buffer containing raw XMP data, if present
* - `xmpAsString`: String containing XMP data, if valid UTF-8.
* - `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
* - `formatMagick`: String containing format for images loaded via *magick
* - `comments`: Array of keyword/text pairs representing PNG text blocks, if present.