TypeScript: add definition for keepMetadata (#3914)

This commit is contained in:
Abhishek V
2023-12-24 15:54:54 +05:30
committed by GitHub
parent cd5cf7ce2d
commit 77ab5d7a51
2 changed files with 12 additions and 0 deletions

View File

@@ -44,6 +44,12 @@ sharp('input.png')
// sharpened, with metadata, 90% quality WebP image data. Phew!
});
sharp('input.png')
.keepMetadata()
.toFile('output.png', (err, info) => {
// output.png is an image containing input.png along with all metadata(EXIF, ICC, XMP, IPTC) from input.png
})
sharp('input.jpg')
.resize(300, 200)
.toFile('output.jpg', (err: Error) => {