Add margin option to trim operation #4480

This commit is contained in:
Dmytro Tiapukhin
2026-01-02 09:32:31 +00:00
committed by Lovell Fuller
parent d161e45e06
commit a5e726002c
15 changed files with 109 additions and 9 deletions

2
lib/index.d.ts vendored
View File

@@ -1606,6 +1606,8 @@ declare namespace sharp {
threshold?: number | undefined;
/** Does the input more closely resemble line art (e.g. vector) rather than being photographic? (optional, default false) */
lineArt?: boolean | undefined;
/** Leave a margin around trimmed content, value is in pixels. (optional, default 0) */
margin?: number | undefined;
}
interface RawOptions {