mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add keepXmp and withXmp for control over output XMP metadata #4416
This commit is contained in:
committed by
Lovell Fuller
parent
df5454e7dc
commit
4e3f3792ad
16
lib/index.d.ts
vendored
16
lib/index.d.ts
vendored
@@ -419,7 +419,7 @@ declare namespace sharp {
|
||||
* @returns {Sharp}
|
||||
*/
|
||||
autoOrient(): Sharp
|
||||
|
||||
|
||||
/**
|
||||
* Flip the image about the vertical Y axis. This always occurs after rotation, if any.
|
||||
* The use of flip implies the removal of the EXIF Orientation tag, if any.
|
||||
@@ -730,6 +730,20 @@ declare namespace sharp {
|
||||
*/
|
||||
withIccProfile(icc: string, options?: WithIccProfileOptions): Sharp;
|
||||
|
||||
/**
|
||||
* Keep all XMP metadata from the input image in the output image.
|
||||
* @returns A sharp instance that can be used to chain operations
|
||||
*/
|
||||
keepXmp(): Sharp;
|
||||
|
||||
/**
|
||||
* Set XMP metadata in the output image.
|
||||
* @param {string} xmp - String containing XMP metadata to be embedded in the output image.
|
||||
* @returns A sharp instance that can be used to chain operations
|
||||
* @throws {Error} Invalid parameters
|
||||
*/
|
||||
withXmp(xmp: string): Sharp;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user