mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
New withMetadata([boolean]) to keep metadata in the generated images.
This commit is contained in:
@@ -130,12 +130,13 @@ sharp('input.png')
|
||||
.rotate(180)
|
||||
.resize(300)
|
||||
.sharpen()
|
||||
.withMetadata()
|
||||
.quality(90)
|
||||
.webp()
|
||||
.toBuffer()
|
||||
.then(function(outputBuffer) {
|
||||
// outputBuffer contains 300px wide, upside down, sharpened,
|
||||
// 90% quality WebP image data
|
||||
// with metadata, 90% quality WebP image data
|
||||
});
|
||||
```
|
||||
|
||||
@@ -278,6 +279,10 @@ Possible interpolators, in order of performance, are:
|
||||
|
||||
### Output options
|
||||
|
||||
#### withMetadata([boolean])
|
||||
|
||||
Specifies if the output image should contains the original metadata or not.
|
||||
|
||||
#### progressive()
|
||||
|
||||
Use progressive (interlace) scan for JPEG and PNG output. This typically reduces compression performance by 30% but results in an image that can be rendered sooner when decompressed.
|
||||
|
||||
Reference in New Issue
Block a user