diff --git a/README.md b/README.md index 50c2004..1e2c281 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,8 @@ You can universally customize IPX configuration using `IPX_*` environment variab | flop | [Docs](https://sharp.pixelplumbing.com/api-operation#flop) | `/flop/buffalo.png` | | sharpen | [Docs](https://sharp.pixelplumbing.com/api-operation#sharpen) | `/sharpen_30/buffalo.png` | | median | [Docs](https://sharp.pixelplumbing.com/api-operation#median) | `/median_10/buffalo.png` | -| blur | [Docs](https://sharp.pixelplumbing.com/api-operation#blur) | `/blur_5/buffalo.png` | +| blur | [Docs](https://sharp.pixelplumbing.com/api-operation#blur) | `/blur_5/buffalo.png` +| unflatten | [Docs](https://sharp.pixelplumbing.com/api-operation#unflatten) | `/unflatten/buffalo.png` | | | gamma | [Docs](https://sharp.pixelplumbing.com/api-operation#gamma) | `/gamma_3/buffalo.png` | | negate | [Docs](https://sharp.pixelplumbing.com/api-operation#negate) | `/negate/buffalo.png` | | normalize | [Docs](https://sharp.pixelplumbing.com/api-operation#normalize) | `/normalize/buffalo.png` | diff --git a/src/handlers/handlers.ts b/src/handlers/handlers.ts index 85fe237..3cfb61f 100644 --- a/src/handlers/handlers.ts +++ b/src/handlers/handlers.ts @@ -209,6 +209,15 @@ export const flatten: Handler = { }, }; +// https://sharp.pixelplumbing.com/api-operation#unflatten +// This feature is experimental and the API may change. +export const unflatten: Handler = { + args: [], + apply: (_context, pipe) => { + return pipe.unflatten(); + }, +}; + // https://sharp.pixelplumbing.com/api-operation#gamma export const gamma: Handler = { args: [VArgument, VArgument, VArgument],