mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose erode and dilate operations #4243
This commit is contained in:
committed by
Lovell Fuller
parent
03e1b19764
commit
031c808aa5
16
lib/index.d.ts
vendored
16
lib/index.d.ts
vendored
@@ -504,6 +504,22 @@ declare namespace sharp {
|
||||
*/
|
||||
blur(sigma?: number | boolean | BlurOptions): Sharp;
|
||||
|
||||
/**
|
||||
* Expand foreground objects using the dilate morphological operator.
|
||||
* @param {Number} [width=1] dilation width in pixels.
|
||||
* @throws {Error} Invalid parameters
|
||||
* @returns A sharp instance that can be used to chain operations
|
||||
*/
|
||||
dilate(width?: number): Sharp;
|
||||
|
||||
/**
|
||||
* Shrink foreground objects using the erode morphological operator.
|
||||
* @param {Number} [width=1] erosion width in pixels.
|
||||
* @throws {Error} Invalid parameters
|
||||
* @returns A sharp instance that can be used to chain operations
|
||||
*/
|
||||
erode(width?: number): Sharp;
|
||||
|
||||
/**
|
||||
* Merge alpha transparency channel, if any, with background.
|
||||
* @param flatten true to enable and false to disable (defaults to true)
|
||||
|
||||
Reference in New Issue
Block a user