mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
TypeScript: add definition for keepMetadata (#3914)
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user