Ensure create has correct bit depth and colourspace #3139

This commit is contained in:
Lovell Fuller
2022-03-22 19:48:02 +00:00
parent b609df4b48
commit 1d36936954
6 changed files with 50 additions and 8 deletions

View File

@@ -289,6 +289,20 @@ Produce the "negative" of the image.
* `options.alpha` **[Boolean][6]** Whether or not to negate any alpha channel (optional, default `true`)
### Examples
```javascript
const output = await sharp(input)
.negate()
.toBuffer();
```
```javascript
const output = await sharp(input)
.negate({ alpha: false })
.toBuffer();
```
Returns **Sharp**
## normalise

View File

@@ -4,6 +4,11 @@
Requires libvips v8.12.2
### v0.30.4 - TBD
* Ensure `create` input image has correct bit depth and colour space.
[#3139](https://github.com/lovell/sharp/issues/3139)
### v0.30.3 - 14th March 2022
* Allow `sharpen` options to be provided more consistently as an Object.