mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
TypeScript: add missing definitions for OverlayOptions (#4048)
This commit is contained in:
parent
02fd565476
commit
0981b24f60
8
lib/index.d.ts
vendored
8
lib/index.d.ts
vendored
@ -1479,6 +1479,14 @@ declare namespace sharp {
|
||||
tile?: boolean | undefined;
|
||||
/** Set to true to avoid premultipling the image below. Equivalent to the --premultiplied vips option. */
|
||||
premultiplied?: boolean | undefined;
|
||||
/** number representing the DPI for vector overlay image. (optional, default 72)*/
|
||||
density?: number | undefined;
|
||||
/** Set to true to read all frames/pages of an animated image. (optional, default false) */
|
||||
animated?: boolean | undefined;
|
||||
/** see sharp() constructor, (optional, default 'warning') */
|
||||
failOn?: FailOnOptions | undefined;
|
||||
/** see sharp() constructor, (optional, default 268402689) */
|
||||
limitInputPixels?: number | boolean | undefined;
|
||||
}
|
||||
|
||||
interface TileOptions {
|
||||
|
@ -680,3 +680,24 @@ sharp(input)
|
||||
.keepIccProfile()
|
||||
.withIccProfile('filename')
|
||||
.withIccProfile('filename', { attach: false });
|
||||
|
||||
// Added missing types for OverlayOptions
|
||||
// https://github.com/lovell/sharp/pull/4048
|
||||
sharp(input).composite([
|
||||
{
|
||||
input: 'image.gif',
|
||||
animated: true,
|
||||
limitInputPixels: 536805378,
|
||||
density: 144,
|
||||
failOn: "warning"
|
||||
}
|
||||
])
|
||||
sharp(input).composite([
|
||||
{
|
||||
input: 'image.png',
|
||||
animated: false,
|
||||
limitInputPixels: 178935126,
|
||||
density: 72,
|
||||
failOn: "truncated"
|
||||
}
|
||||
])
|
Loading…
x
Reference in New Issue
Block a user