mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
🤖 Merge PR #46149 [sharp] Allow boolean to be passed to blur by @jeremistadler
* Allow boolean to be passed to blur https://github.com/lovell/sharp/blob/master/lib/operation.js#L163 * [sharp] Add blur boolean tests
This commit is contained in:
parent
470eb9348f
commit
7615d5e704
3
types/sharp/index.d.ts
vendored
3
types/sharp/index.d.ts
vendored
@ -312,11 +312,12 @@ declare namespace sharp {
|
||||
* Blur the image.
|
||||
* When used without parameters, performs a fast, mild blur of the output image.
|
||||
* When a sigma is provided, performs a slower, more accurate Gaussian blur.
|
||||
* When a boolean sigma is provided, ether blur mild or disable blur
|
||||
* @param sigma a value between 0.3 and 1000 representing the sigma of the Gaussian mask, where sigma = 1 + radius / 2.
|
||||
* @throws {Error} Invalid parameters
|
||||
* @returns A sharp instance that can be used to chain operations
|
||||
*/
|
||||
blur(sigma?: number): Sharp;
|
||||
blur(sigma?: number | boolean): Sharp;
|
||||
|
||||
/**
|
||||
* Merge alpha transparency channel, if any, with background.
|
||||
|
||||
@ -48,6 +48,8 @@ sharp('input.jpg')
|
||||
|
||||
sharp('input.jpg')
|
||||
.resize({width: 300})
|
||||
.blur(false)
|
||||
.blur(true)
|
||||
.toFile('output.jpg');
|
||||
|
||||
sharp({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user