wasm-vips 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -6
- package/lib/vips-es6.js +505 -209
- package/lib/vips-es6.worker.js +1 -1
- package/lib/vips-heif.wasm +0 -0
- package/lib/vips-jxl.wasm +0 -0
- package/lib/vips-node.js +520 -0
- package/lib/vips-node.mjs +518 -0
- package/lib/vips-node.worker.js +1 -0
- package/lib/vips-node.worker.mjs +1 -0
- package/lib/vips-resvg.wasm +0 -0
- package/lib/vips.d.ts +350 -147
- package/lib/vips.js +506 -210
- package/lib/vips.wasm +0 -0
- package/lib/vips.worker.js +1 -1
- package/package.json +13 -9
- package/lib/node-commonjs/vips.js +0 -222
- package/lib/node-commonjs/vips.worker.js +0 -1
- package/lib/node-es6/vips.mjs +0 -222
- package/lib/node-es6/vips.worker.mjs +0 -1
package/lib/vips.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ interface EmscriptenModule {
|
|
|
6
6
|
print(str: string): void;
|
|
7
7
|
printErr(str: string): void;
|
|
8
8
|
|
|
9
|
+
dynamicLibraries: string[];
|
|
10
|
+
|
|
9
11
|
preInit: ModuleCallback | ModuleCallback[];
|
|
10
12
|
preRun: ModuleCallback | ModuleCallback[];
|
|
11
13
|
postRun: ModuleCallback | ModuleCallback[];
|
|
@@ -19,6 +21,9 @@ interface EmscriptenModule {
|
|
|
19
21
|
): WebAssembly.Exports;
|
|
20
22
|
locateFile(url: string, scriptDirectory: string): string;
|
|
21
23
|
mainScriptUrlOrBlob: Blob | File | string;
|
|
24
|
+
|
|
25
|
+
// https://github.com/kleisauke/wasm-vips/issues/12
|
|
26
|
+
workaroundCors: boolean;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
declare module Vips {
|
|
@@ -69,9 +74,41 @@ declare module Vips {
|
|
|
69
74
|
function concurrency(concurrency?: number): void | number;
|
|
70
75
|
|
|
71
76
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
77
|
+
* Set the block state on all untrusted operations.
|
|
78
|
+
* For example:
|
|
79
|
+
* ```js
|
|
80
|
+
* vips.blockUntrusted(true);
|
|
81
|
+
* ```
|
|
82
|
+
* Will block all untrusted operations from running. Use:
|
|
83
|
+
* ```bash
|
|
84
|
+
* $ vips -l | grep untrusted
|
|
85
|
+
* ```
|
|
86
|
+
* at the command-line to see which operations are marked as untrusted.
|
|
87
|
+
* @param state Set to `true` to block the operations, set to `false` to re-enable them.
|
|
88
|
+
*/
|
|
89
|
+
function blockUntrusted(state: boolean): void;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Set the block state on all operations in the libvips class hierarchy.
|
|
93
|
+
* For example:
|
|
94
|
+
* ```js
|
|
95
|
+
* vips.operationBlock('VipsForeignLoad', true);
|
|
96
|
+
* vips.operationBlock('VipsForeignLoadJpeg', false);
|
|
97
|
+
* ```
|
|
98
|
+
* Will block all load operations, except JPEG. Use:
|
|
99
|
+
* ```bash
|
|
100
|
+
* $ vips -l
|
|
101
|
+
* ```
|
|
102
|
+
* at the command-line to see the class hierarchy.
|
|
103
|
+
* @param name The name of the operation in the libvips class hierarchy.
|
|
104
|
+
* @param state Set to `true` to block the operation, set to `false` to re-enable it.
|
|
105
|
+
*/
|
|
106
|
+
function operationBlock(name: string, state: boolean): void;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Call this to drop caches, close plugins, terminate background threads, and finalize any internal library testing.
|
|
110
|
+
* Calling this is optional. If you don't call it, your platform will clean up for you.
|
|
111
|
+
* The only negative consequences are that the leak checker and the profiler will not work.
|
|
75
112
|
*/
|
|
76
113
|
function shutdown(): void;
|
|
77
114
|
|
|
@@ -226,23 +263,6 @@ declare module Vips {
|
|
|
226
263
|
static files(): number;
|
|
227
264
|
}
|
|
228
265
|
|
|
229
|
-
/**
|
|
230
|
-
* An abstract class for error messages and error handling.
|
|
231
|
-
*/
|
|
232
|
-
abstract class Error {
|
|
233
|
-
/**
|
|
234
|
-
* Get the error buffer as a string.
|
|
235
|
-
* @return The error buffer as a string.
|
|
236
|
-
*/
|
|
237
|
-
static buffer(): string;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Clear and reset the error buffer.
|
|
241
|
-
* This is typically called after presenting an error to the user.
|
|
242
|
-
*/
|
|
243
|
-
static clear(): void;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
266
|
/**
|
|
247
267
|
* Handy utilities.
|
|
248
268
|
*/
|
|
@@ -341,7 +361,7 @@ declare module Vips {
|
|
|
341
361
|
/**
|
|
342
362
|
* Make a new target to write to a file.
|
|
343
363
|
*
|
|
344
|
-
* Make a new target that will write to the named file. For example
|
|
364
|
+
* Make a new target that will write to the named file. For example:
|
|
345
365
|
* ```js
|
|
346
366
|
* const target = vips.Target.newToFile('myfile.jpg');
|
|
347
367
|
* ```
|
|
@@ -1426,7 +1446,7 @@ declare module Vips {
|
|
|
1426
1446
|
|
|
1427
1447
|
/**
|
|
1428
1448
|
* The format used for each band element.
|
|
1429
|
-
*
|
|
1449
|
+
*
|
|
1430
1450
|
* Each corresponds to a native C type for the current machine. For example,
|
|
1431
1451
|
* #VIPS_FORMAT_USHORT is <type>unsigned short</type>.
|
|
1432
1452
|
*/
|
|
@@ -1476,11 +1496,11 @@ declare module Vips {
|
|
|
1476
1496
|
/**
|
|
1477
1497
|
* The various Porter-Duff and PDF blend modes. See vips_composite(),
|
|
1478
1498
|
* for example.
|
|
1479
|
-
*
|
|
1499
|
+
*
|
|
1480
1500
|
* The Cairo docs have a nice explanation of all the blend modes:
|
|
1481
|
-
*
|
|
1501
|
+
*
|
|
1482
1502
|
* https://www.cairographics.org/operators
|
|
1483
|
-
*
|
|
1503
|
+
*
|
|
1484
1504
|
* The non-separable modes are not implemented.
|
|
1485
1505
|
*/
|
|
1486
1506
|
enum BlendMode {
|
|
@@ -1588,11 +1608,11 @@ declare module Vips {
|
|
|
1588
1608
|
|
|
1589
1609
|
/**
|
|
1590
1610
|
* How pixels are coded.
|
|
1591
|
-
*
|
|
1611
|
+
*
|
|
1592
1612
|
* Normally, pixels are uncoded and can be manipulated as you would expect.
|
|
1593
1613
|
* However some file formats code pixels for compression, and sometimes it's
|
|
1594
1614
|
* useful to be able to manipulate images in the coded format.
|
|
1595
|
-
*
|
|
1615
|
+
*
|
|
1596
1616
|
* The gaps in the numbering are historical and must be maintained. Allocate
|
|
1597
1617
|
* new numbers from the end.
|
|
1598
1618
|
*/
|
|
@@ -1615,10 +1635,10 @@ declare module Vips {
|
|
|
1615
1635
|
* How the values in an image should be interpreted. For example, a
|
|
1616
1636
|
* three-band float image of type #VIPS_INTERPRETATION_LAB should have its
|
|
1617
1637
|
* pixels interpreted as coordinates in CIE Lab space.
|
|
1618
|
-
*
|
|
1638
|
+
*
|
|
1619
1639
|
* RGB and sRGB are treated in the same way. Use the colourspace functions if
|
|
1620
1640
|
* you want some other behaviour.
|
|
1621
|
-
*
|
|
1641
|
+
*
|
|
1622
1642
|
* The gaps in numbering are historical and must be maintained. Allocate
|
|
1623
1643
|
* new numbers from the end.
|
|
1624
1644
|
*/
|
|
@@ -1704,33 +1724,33 @@ declare module Vips {
|
|
|
1704
1724
|
/**
|
|
1705
1725
|
* See vips_image_pipelinev(). Operations can hint to the VIPS image IO
|
|
1706
1726
|
* system about the kind of demand geometry they prefer.
|
|
1707
|
-
*
|
|
1727
|
+
*
|
|
1708
1728
|
* These demand styles are given below in order of increasing
|
|
1709
1729
|
* restrictiveness. When demanding output from a pipeline,
|
|
1710
1730
|
* vips_image_generate()
|
|
1711
1731
|
* will use the most restrictive of the styles requested by the operations
|
|
1712
1732
|
* in the pipeline.
|
|
1713
|
-
*
|
|
1733
|
+
*
|
|
1714
1734
|
* #VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips
|
|
1715
1735
|
* the width of the image and a few pels high. This is option suitable for
|
|
1716
1736
|
* point-to-point operations, such as those in the arithmetic package.
|
|
1717
|
-
*
|
|
1737
|
+
*
|
|
1718
1738
|
* This option is only efficient for cases where each output pel depends
|
|
1719
1739
|
* upon the pel in the corresponding position in the input image.
|
|
1720
|
-
*
|
|
1740
|
+
*
|
|
1721
1741
|
* #VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips
|
|
1722
1742
|
* the width of the image and as high as possible. This option is suitable
|
|
1723
1743
|
* for area operations which do not violently transform coordinates, such
|
|
1724
1744
|
* as vips_conv().
|
|
1725
|
-
*
|
|
1745
|
+
*
|
|
1726
1746
|
* #VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format.
|
|
1727
1747
|
* Output is demanded in small (around 100x100 pel) sections. This style works
|
|
1728
1748
|
* reasonably efficiently, even for bizzare operations like 45 degree rotate.
|
|
1729
|
-
*
|
|
1749
|
+
*
|
|
1730
1750
|
* #VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc
|
|
1731
1751
|
* file (even indirectly) so any demand style is OK. It's used for things like
|
|
1732
1752
|
* vips_black() where the pixels are calculated.
|
|
1733
|
-
*
|
|
1753
|
+
*
|
|
1734
1754
|
* See also: vips_image_pipelinev().
|
|
1735
1755
|
*/
|
|
1736
1756
|
enum DemandStyle {
|
|
@@ -1973,9 +1993,9 @@ declare module Vips {
|
|
|
1973
1993
|
/**
|
|
1974
1994
|
* The type of access an operation has to supply. See vips_tilecache()
|
|
1975
1995
|
* and #VipsForeign.
|
|
1976
|
-
*
|
|
1996
|
+
*
|
|
1977
1997
|
* @VIPS_ACCESS_RANDOM means requests can come in any order.
|
|
1978
|
-
*
|
|
1998
|
+
*
|
|
1979
1999
|
* @VIPS_ACCESS_SEQUENTIAL means requests will be top-to-bottom, but with some
|
|
1980
2000
|
* amount of buffering behind the read point for small non-local accesses.
|
|
1981
2001
|
*/
|
|
@@ -1993,27 +2013,27 @@ declare module Vips {
|
|
|
1993
2013
|
|
|
1994
2014
|
/**
|
|
1995
2015
|
* See vips_embed(), vips_conv(), vips_affine() and so on.
|
|
1996
|
-
*
|
|
2016
|
+
*
|
|
1997
2017
|
* When the edges of an image are extended, you can specify
|
|
1998
2018
|
* how you want the extension done.
|
|
1999
|
-
*
|
|
2019
|
+
*
|
|
2000
2020
|
* #VIPS_EXTEND_BLACK --- new pixels are black, ie. all bits are zero.
|
|
2001
|
-
*
|
|
2021
|
+
*
|
|
2002
2022
|
* #VIPS_EXTEND_COPY --- each new pixel takes the value of the nearest edge
|
|
2003
2023
|
* pixel
|
|
2004
|
-
*
|
|
2024
|
+
*
|
|
2005
2025
|
* #VIPS_EXTEND_REPEAT --- the image is tiled to fill the new area
|
|
2006
|
-
*
|
|
2026
|
+
*
|
|
2007
2027
|
* #VIPS_EXTEND_MIRROR --- the image is reflected and tiled to reduce hash
|
|
2008
2028
|
* edges
|
|
2009
|
-
*
|
|
2029
|
+
*
|
|
2010
2030
|
* #VIPS_EXTEND_WHITE --- new pixels are white, ie. all bits are set
|
|
2011
|
-
*
|
|
2031
|
+
*
|
|
2012
2032
|
* #VIPS_EXTEND_BACKGROUND --- colour set from the @background property
|
|
2013
|
-
*
|
|
2033
|
+
*
|
|
2014
2034
|
* We have to specify the exact value of each enum member since we have to
|
|
2015
2035
|
* keep these frozen for back compat with vips7.
|
|
2016
|
-
*
|
|
2036
|
+
*
|
|
2017
2037
|
* See also: vips_embed().
|
|
2018
2038
|
*/
|
|
2019
2039
|
enum Extend {
|
|
@@ -2087,10 +2107,10 @@ declare module Vips {
|
|
|
2087
2107
|
|
|
2088
2108
|
/**
|
|
2089
2109
|
* See vips_flip(), vips_join() and so on.
|
|
2090
|
-
*
|
|
2110
|
+
*
|
|
2091
2111
|
* Operations like vips_flip() need to be told whether to flip left-right or
|
|
2092
2112
|
* top-bottom.
|
|
2093
|
-
*
|
|
2113
|
+
*
|
|
2094
2114
|
* See also: vips_flip(), vips_join().
|
|
2095
2115
|
*/
|
|
2096
2116
|
enum Direction {
|
|
@@ -2106,10 +2126,10 @@ declare module Vips {
|
|
|
2106
2126
|
|
|
2107
2127
|
/**
|
|
2108
2128
|
* See vips_join() and so on.
|
|
2109
|
-
*
|
|
2129
|
+
*
|
|
2110
2130
|
* Operations like vips_join() need to be told whether to align images on the
|
|
2111
2131
|
* low or high coordinate edge, or centre.
|
|
2112
|
-
*
|
|
2132
|
+
*
|
|
2113
2133
|
* See also: vips_join().
|
|
2114
2134
|
*/
|
|
2115
2135
|
enum Align {
|
|
@@ -2131,11 +2151,11 @@ declare module Vips {
|
|
|
2131
2151
|
* Pick the algorithm vips uses to decide image "interestingness". This is used
|
|
2132
2152
|
* by vips_smartcrop(), for example, to decide what parts of the image to
|
|
2133
2153
|
* keep.
|
|
2134
|
-
*
|
|
2154
|
+
*
|
|
2135
2155
|
* #VIPS_INTERESTING_NONE and #VIPS_INTERESTING_LOW mean the same -- the
|
|
2136
2156
|
* crop is positioned at the top or left. #VIPS_INTERESTING_HIGH positions at
|
|
2137
2157
|
* the bottom or right.
|
|
2138
|
-
*
|
|
2158
|
+
*
|
|
2139
2159
|
* See also: vips_smartcrop().
|
|
2140
2160
|
*/
|
|
2141
2161
|
enum Interesting {
|
|
@@ -2171,9 +2191,9 @@ declare module Vips {
|
|
|
2171
2191
|
|
|
2172
2192
|
/**
|
|
2173
2193
|
* See vips_rot() and so on.
|
|
2174
|
-
*
|
|
2194
|
+
*
|
|
2175
2195
|
* Fixed rotate angles.
|
|
2176
|
-
*
|
|
2196
|
+
*
|
|
2177
2197
|
* See also: vips_rot().
|
|
2178
2198
|
*/
|
|
2179
2199
|
enum Angle {
|
|
@@ -2197,9 +2217,9 @@ declare module Vips {
|
|
|
2197
2217
|
|
|
2198
2218
|
/**
|
|
2199
2219
|
* See vips_rot45() and so on.
|
|
2200
|
-
*
|
|
2220
|
+
*
|
|
2201
2221
|
* Fixed rotate angles.
|
|
2202
|
-
*
|
|
2222
|
+
*
|
|
2203
2223
|
* See also: vips_rot45().
|
|
2204
2224
|
*/
|
|
2205
2225
|
enum Angle45 {
|
|
@@ -2255,10 +2275,35 @@ declare module Vips {
|
|
|
2255
2275
|
approximate = 'approximate'
|
|
2256
2276
|
}
|
|
2257
2277
|
|
|
2278
|
+
/**
|
|
2279
|
+
* Sets the word wrapping style for vips_text() when used with a maximum
|
|
2280
|
+
* width.
|
|
2281
|
+
*
|
|
2282
|
+
* See also: vips_text().
|
|
2283
|
+
*/
|
|
2284
|
+
enum TextWrap {
|
|
2285
|
+
/**
|
|
2286
|
+
* Wrap at word boundaries
|
|
2287
|
+
*/
|
|
2288
|
+
word = 'word',
|
|
2289
|
+
/**
|
|
2290
|
+
* Wrap at character boundaries
|
|
2291
|
+
*/
|
|
2292
|
+
char = 'char',
|
|
2293
|
+
/**
|
|
2294
|
+
* Wrap at word boundaries, but fall back to character boundaries if there is not enough space for a full word
|
|
2295
|
+
*/
|
|
2296
|
+
word_char = 'word-char',
|
|
2297
|
+
/**
|
|
2298
|
+
* No wrapping
|
|
2299
|
+
*/
|
|
2300
|
+
none = 'none'
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2258
2303
|
/**
|
|
2259
2304
|
* How sensitive loaders are to errors, from never stop (very insensitive), to
|
|
2260
2305
|
* stop on the smallest warning (very sensitive).
|
|
2261
|
-
*
|
|
2306
|
+
*
|
|
2262
2307
|
* Each one implies the ones before it, so #VIPS_FAIL_ON_ERROR implies
|
|
2263
2308
|
* #VIPS_FAIL_ON_TRUNCATED.
|
|
2264
2309
|
*/
|
|
@@ -2283,14 +2328,17 @@ declare module Vips {
|
|
|
2283
2328
|
|
|
2284
2329
|
/**
|
|
2285
2330
|
* The netpbm file format to save as.
|
|
2286
|
-
*
|
|
2331
|
+
*
|
|
2287
2332
|
* #VIPS_FOREIGN_PPM_FORMAT_PBM images are single bit.
|
|
2288
|
-
*
|
|
2333
|
+
*
|
|
2289
2334
|
* #VIPS_FOREIGN_PPM_FORMAT_PGM images are 8, 16, or 32-bits, one band.
|
|
2290
|
-
*
|
|
2335
|
+
*
|
|
2291
2336
|
* #VIPS_FOREIGN_PPM_FORMAT_PPM images are 8, 16, or 32-bits, three bands.
|
|
2292
|
-
*
|
|
2337
|
+
*
|
|
2293
2338
|
* #VIPS_FOREIGN_PPM_FORMAT_PFM images are 32-bit float pixels.
|
|
2339
|
+
*
|
|
2340
|
+
* #VIPS_FOREIGN_PPM_FORMAT_PNM images are anymap images -- the image format
|
|
2341
|
+
* is used to pick the saver.
|
|
2294
2342
|
*/
|
|
2295
2343
|
enum ForeignPpmFormat {
|
|
2296
2344
|
/**
|
|
@@ -2308,7 +2356,11 @@ declare module Vips {
|
|
|
2308
2356
|
/**
|
|
2309
2357
|
* Portable float map
|
|
2310
2358
|
*/
|
|
2311
|
-
pfm = 'pfm'
|
|
2359
|
+
pfm = 'pfm',
|
|
2360
|
+
/**
|
|
2361
|
+
* Portable anymap
|
|
2362
|
+
*/
|
|
2363
|
+
pnm = 'pnm'
|
|
2312
2364
|
}
|
|
2313
2365
|
|
|
2314
2366
|
/**
|
|
@@ -2453,13 +2505,13 @@ declare module Vips {
|
|
|
2453
2505
|
|
|
2454
2506
|
/**
|
|
2455
2507
|
* The compression types supported by the tiff writer.
|
|
2456
|
-
*
|
|
2508
|
+
*
|
|
2457
2509
|
* Use @Q to set the jpeg compression level, default 75.
|
|
2458
|
-
*
|
|
2510
|
+
*
|
|
2459
2511
|
* Use @predictor to set the lzw or deflate prediction, default horizontal.
|
|
2460
|
-
*
|
|
2512
|
+
*
|
|
2461
2513
|
* Use @lossless to set WEBP lossless compression.
|
|
2462
|
-
*
|
|
2514
|
+
*
|
|
2463
2515
|
* Use @level to set webp and zstd compression level.
|
|
2464
2516
|
*/
|
|
2465
2517
|
enum ForeignTiffCompression {
|
|
@@ -2536,7 +2588,7 @@ declare module Vips {
|
|
|
2536
2588
|
|
|
2537
2589
|
/**
|
|
2538
2590
|
* The compression format to use inside a HEIF container.
|
|
2539
|
-
*
|
|
2591
|
+
*
|
|
2540
2592
|
* This is assumed to use the same numbering as %heif_compression_format.
|
|
2541
2593
|
*/
|
|
2542
2594
|
enum ForeignHeifCompression {
|
|
@@ -2558,10 +2610,38 @@ declare module Vips {
|
|
|
2558
2610
|
av1 = 'av1'
|
|
2559
2611
|
}
|
|
2560
2612
|
|
|
2613
|
+
/**
|
|
2614
|
+
* The selected encoder to use.
|
|
2615
|
+
* If libheif hasn't been compiled with the selected encoder,
|
|
2616
|
+
* we will fallback to the default encoder for the compression format.
|
|
2617
|
+
*/
|
|
2618
|
+
enum ForeignHeifEncoder {
|
|
2619
|
+
/**
|
|
2620
|
+
* Auto
|
|
2621
|
+
*/
|
|
2622
|
+
auto = 'auto',
|
|
2623
|
+
/**
|
|
2624
|
+
* Aom
|
|
2625
|
+
*/
|
|
2626
|
+
aom = 'aom',
|
|
2627
|
+
/**
|
|
2628
|
+
* RAV1E
|
|
2629
|
+
*/
|
|
2630
|
+
rav1e = 'rav1e',
|
|
2631
|
+
/**
|
|
2632
|
+
* SVT-AV1
|
|
2633
|
+
*/
|
|
2634
|
+
svt = 'svt',
|
|
2635
|
+
/**
|
|
2636
|
+
* X265
|
|
2637
|
+
*/
|
|
2638
|
+
x265 = 'x265'
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2561
2641
|
/**
|
|
2562
2642
|
* Controls whether an operation should upsize, downsize, both up and
|
|
2563
2643
|
* downsize, or force a size.
|
|
2564
|
-
*
|
|
2644
|
+
*
|
|
2565
2645
|
* See also: vips_thumbnail().
|
|
2566
2646
|
*/
|
|
2567
2647
|
enum Size {
|
|
@@ -2655,7 +2735,7 @@ declare module Vips {
|
|
|
2655
2735
|
|
|
2656
2736
|
/**
|
|
2657
2737
|
* More like hit-miss, really.
|
|
2658
|
-
*
|
|
2738
|
+
*
|
|
2659
2739
|
* See also: vips_morph().
|
|
2660
2740
|
*/
|
|
2661
2741
|
enum OperationMorphology {
|
|
@@ -2671,10 +2751,10 @@ declare module Vips {
|
|
|
2671
2751
|
|
|
2672
2752
|
/**
|
|
2673
2753
|
* See vips_draw_image() and so on.
|
|
2674
|
-
*
|
|
2754
|
+
*
|
|
2675
2755
|
* Operations like vips_draw_image() need to be told how to combine images
|
|
2676
2756
|
* from two sources.
|
|
2677
|
-
*
|
|
2757
|
+
*
|
|
2678
2758
|
* See also: vips_join().
|
|
2679
2759
|
*/
|
|
2680
2760
|
enum CombineMode {
|
|
@@ -3029,11 +3109,11 @@ declare module Vips {
|
|
|
3029
3109
|
*/
|
|
3030
3110
|
static gifload(filename: string, options?: {
|
|
3031
3111
|
/**
|
|
3032
|
-
*
|
|
3112
|
+
* Number of pages to load, -1 for all.
|
|
3033
3113
|
*/
|
|
3034
3114
|
n?: number
|
|
3035
3115
|
/**
|
|
3036
|
-
*
|
|
3116
|
+
* First page to load.
|
|
3037
3117
|
*/
|
|
3038
3118
|
page?: number
|
|
3039
3119
|
/**
|
|
@@ -3062,11 +3142,11 @@ declare module Vips {
|
|
|
3062
3142
|
*/
|
|
3063
3143
|
static gifloadBuffer(buffer: Blob, options?: {
|
|
3064
3144
|
/**
|
|
3065
|
-
*
|
|
3145
|
+
* Number of pages to load, -1 for all.
|
|
3066
3146
|
*/
|
|
3067
3147
|
n?: number
|
|
3068
3148
|
/**
|
|
3069
|
-
*
|
|
3149
|
+
* First page to load.
|
|
3070
3150
|
*/
|
|
3071
3151
|
page?: number
|
|
3072
3152
|
/**
|
|
@@ -3095,11 +3175,11 @@ declare module Vips {
|
|
|
3095
3175
|
*/
|
|
3096
3176
|
static gifloadSource(source: Source, options?: {
|
|
3097
3177
|
/**
|
|
3098
|
-
*
|
|
3178
|
+
* Number of pages to load, -1 for all.
|
|
3099
3179
|
*/
|
|
3100
3180
|
n?: number
|
|
3101
3181
|
/**
|
|
3102
|
-
*
|
|
3182
|
+
* First page to load.
|
|
3103
3183
|
*/
|
|
3104
3184
|
page?: number
|
|
3105
3185
|
/**
|
|
@@ -3142,11 +3222,11 @@ declare module Vips {
|
|
|
3142
3222
|
*/
|
|
3143
3223
|
static heifload(filename: string, options?: {
|
|
3144
3224
|
/**
|
|
3145
|
-
*
|
|
3225
|
+
* First page to load.
|
|
3146
3226
|
*/
|
|
3147
3227
|
page?: number
|
|
3148
3228
|
/**
|
|
3149
|
-
*
|
|
3229
|
+
* Number of pages to load, -1 for all.
|
|
3150
3230
|
*/
|
|
3151
3231
|
n?: number
|
|
3152
3232
|
/**
|
|
@@ -3183,11 +3263,11 @@ declare module Vips {
|
|
|
3183
3263
|
*/
|
|
3184
3264
|
static heifloadBuffer(buffer: Blob, options?: {
|
|
3185
3265
|
/**
|
|
3186
|
-
*
|
|
3266
|
+
* First page to load.
|
|
3187
3267
|
*/
|
|
3188
3268
|
page?: number
|
|
3189
3269
|
/**
|
|
3190
|
-
*
|
|
3270
|
+
* Number of pages to load, -1 for all.
|
|
3191
3271
|
*/
|
|
3192
3272
|
n?: number
|
|
3193
3273
|
/**
|
|
@@ -3224,11 +3304,11 @@ declare module Vips {
|
|
|
3224
3304
|
*/
|
|
3225
3305
|
static heifloadSource(source: Source, options?: {
|
|
3226
3306
|
/**
|
|
3227
|
-
*
|
|
3307
|
+
* First page to load.
|
|
3228
3308
|
*/
|
|
3229
3309
|
page?: number
|
|
3230
3310
|
/**
|
|
3231
|
-
*
|
|
3311
|
+
* Number of pages to load, -1 for all.
|
|
3232
3312
|
*/
|
|
3233
3313
|
n?: number
|
|
3234
3314
|
/**
|
|
@@ -3379,6 +3459,10 @@ declare module Vips {
|
|
|
3379
3459
|
* Rotate image using exif orientation.
|
|
3380
3460
|
*/
|
|
3381
3461
|
autorotate?: boolean
|
|
3462
|
+
/**
|
|
3463
|
+
* Remove all denial of service limits.
|
|
3464
|
+
*/
|
|
3465
|
+
unlimited?: boolean
|
|
3382
3466
|
/**
|
|
3383
3467
|
* Force open via memory.
|
|
3384
3468
|
*/
|
|
@@ -3412,6 +3496,10 @@ declare module Vips {
|
|
|
3412
3496
|
* Rotate image using exif orientation.
|
|
3413
3497
|
*/
|
|
3414
3498
|
autorotate?: boolean
|
|
3499
|
+
/**
|
|
3500
|
+
* Remove all denial of service limits.
|
|
3501
|
+
*/
|
|
3502
|
+
unlimited?: boolean
|
|
3415
3503
|
/**
|
|
3416
3504
|
* Force open via memory.
|
|
3417
3505
|
*/
|
|
@@ -3445,6 +3533,10 @@ declare module Vips {
|
|
|
3445
3533
|
* Rotate image using exif orientation.
|
|
3446
3534
|
*/
|
|
3447
3535
|
autorotate?: boolean
|
|
3536
|
+
/**
|
|
3537
|
+
* Remove all denial of service limits.
|
|
3538
|
+
*/
|
|
3539
|
+
unlimited?: boolean
|
|
3448
3540
|
/**
|
|
3449
3541
|
* Force open via memory.
|
|
3450
3542
|
*/
|
|
@@ -3568,11 +3660,11 @@ declare module Vips {
|
|
|
3568
3660
|
*/
|
|
3569
3661
|
density?: string
|
|
3570
3662
|
/**
|
|
3571
|
-
*
|
|
3663
|
+
* First page to load.
|
|
3572
3664
|
*/
|
|
3573
3665
|
page?: number
|
|
3574
3666
|
/**
|
|
3575
|
-
*
|
|
3667
|
+
* Number of pages to load, -1 for all.
|
|
3576
3668
|
*/
|
|
3577
3669
|
n?: number
|
|
3578
3670
|
/**
|
|
@@ -3605,11 +3697,11 @@ declare module Vips {
|
|
|
3605
3697
|
*/
|
|
3606
3698
|
density?: string
|
|
3607
3699
|
/**
|
|
3608
|
-
*
|
|
3700
|
+
* First page to load.
|
|
3609
3701
|
*/
|
|
3610
3702
|
page?: number
|
|
3611
3703
|
/**
|
|
3612
|
-
*
|
|
3704
|
+
* Number of pages to load, -1 for all.
|
|
3613
3705
|
*/
|
|
3614
3706
|
n?: number
|
|
3615
3707
|
/**
|
|
@@ -4075,10 +4167,6 @@ declare module Vips {
|
|
|
4075
4167
|
* @return Output image.
|
|
4076
4168
|
*/
|
|
4077
4169
|
static openslideload(filename: string, options?: {
|
|
4078
|
-
/**
|
|
4079
|
-
* Attach all associated images.
|
|
4080
|
-
*/
|
|
4081
|
-
attach_associated?: boolean
|
|
4082
4170
|
/**
|
|
4083
4171
|
* Load this level from the file.
|
|
4084
4172
|
*/
|
|
@@ -4091,6 +4179,14 @@ declare module Vips {
|
|
|
4091
4179
|
* Load this associated image.
|
|
4092
4180
|
*/
|
|
4093
4181
|
associated?: string
|
|
4182
|
+
/**
|
|
4183
|
+
* Attach all associated images.
|
|
4184
|
+
*/
|
|
4185
|
+
attach_associated?: boolean
|
|
4186
|
+
/**
|
|
4187
|
+
* Output rgb (not rgba).
|
|
4188
|
+
*/
|
|
4189
|
+
rgb?: boolean
|
|
4094
4190
|
/**
|
|
4095
4191
|
* Force open via memory.
|
|
4096
4192
|
*/
|
|
@@ -4116,10 +4212,6 @@ declare module Vips {
|
|
|
4116
4212
|
* @return Output image.
|
|
4117
4213
|
*/
|
|
4118
4214
|
static openslideloadSource(source: Source, options?: {
|
|
4119
|
-
/**
|
|
4120
|
-
* Attach all associated images.
|
|
4121
|
-
*/
|
|
4122
|
-
attach_associated?: boolean
|
|
4123
4215
|
/**
|
|
4124
4216
|
* Load this level from the file.
|
|
4125
4217
|
*/
|
|
@@ -4132,6 +4224,14 @@ declare module Vips {
|
|
|
4132
4224
|
* Load this associated image.
|
|
4133
4225
|
*/
|
|
4134
4226
|
associated?: string
|
|
4227
|
+
/**
|
|
4228
|
+
* Attach all associated images.
|
|
4229
|
+
*/
|
|
4230
|
+
attach_associated?: boolean
|
|
4231
|
+
/**
|
|
4232
|
+
* Output rgb (not rgba).
|
|
4233
|
+
*/
|
|
4234
|
+
rgb?: boolean
|
|
4135
4235
|
/**
|
|
4136
4236
|
* Force open via memory.
|
|
4137
4237
|
*/
|
|
@@ -4158,27 +4258,27 @@ declare module Vips {
|
|
|
4158
4258
|
*/
|
|
4159
4259
|
static pdfload(filename: string, options?: {
|
|
4160
4260
|
/**
|
|
4161
|
-
*
|
|
4261
|
+
* First page to load.
|
|
4162
4262
|
*/
|
|
4163
4263
|
page?: number
|
|
4164
4264
|
/**
|
|
4165
|
-
*
|
|
4265
|
+
* Number of pages to load, -1 for all.
|
|
4166
4266
|
*/
|
|
4167
4267
|
n?: number
|
|
4168
4268
|
/**
|
|
4169
|
-
*
|
|
4269
|
+
* Dpi to render at.
|
|
4170
4270
|
*/
|
|
4171
4271
|
dpi?: number
|
|
4172
4272
|
/**
|
|
4173
|
-
*
|
|
4273
|
+
* Factor to scale by.
|
|
4174
4274
|
*/
|
|
4175
4275
|
scale?: number
|
|
4176
4276
|
/**
|
|
4177
|
-
* Background
|
|
4277
|
+
* Background colour.
|
|
4178
4278
|
*/
|
|
4179
4279
|
background?: ArrayConstant
|
|
4180
4280
|
/**
|
|
4181
|
-
*
|
|
4281
|
+
* Password to decrypt with.
|
|
4182
4282
|
*/
|
|
4183
4283
|
password?: string
|
|
4184
4284
|
/**
|
|
@@ -4207,27 +4307,27 @@ declare module Vips {
|
|
|
4207
4307
|
*/
|
|
4208
4308
|
static pdfloadBuffer(buffer: Blob, options?: {
|
|
4209
4309
|
/**
|
|
4210
|
-
*
|
|
4310
|
+
* First page to load.
|
|
4211
4311
|
*/
|
|
4212
4312
|
page?: number
|
|
4213
4313
|
/**
|
|
4214
|
-
*
|
|
4314
|
+
* Number of pages to load, -1 for all.
|
|
4215
4315
|
*/
|
|
4216
4316
|
n?: number
|
|
4217
4317
|
/**
|
|
4218
|
-
*
|
|
4318
|
+
* Dpi to render at.
|
|
4219
4319
|
*/
|
|
4220
4320
|
dpi?: number
|
|
4221
4321
|
/**
|
|
4222
|
-
*
|
|
4322
|
+
* Factor to scale by.
|
|
4223
4323
|
*/
|
|
4224
4324
|
scale?: number
|
|
4225
4325
|
/**
|
|
4226
|
-
* Background
|
|
4326
|
+
* Background colour.
|
|
4227
4327
|
*/
|
|
4228
4328
|
background?: ArrayConstant
|
|
4229
4329
|
/**
|
|
4230
|
-
*
|
|
4330
|
+
* Password to decrypt with.
|
|
4231
4331
|
*/
|
|
4232
4332
|
password?: string
|
|
4233
4333
|
/**
|
|
@@ -4256,27 +4356,27 @@ declare module Vips {
|
|
|
4256
4356
|
*/
|
|
4257
4357
|
static pdfloadSource(source: Source, options?: {
|
|
4258
4358
|
/**
|
|
4259
|
-
*
|
|
4359
|
+
* First page to load.
|
|
4260
4360
|
*/
|
|
4261
4361
|
page?: number
|
|
4262
4362
|
/**
|
|
4263
|
-
*
|
|
4363
|
+
* Number of pages to load, -1 for all.
|
|
4264
4364
|
*/
|
|
4265
4365
|
n?: number
|
|
4266
4366
|
/**
|
|
4267
|
-
*
|
|
4367
|
+
* Dpi to render at.
|
|
4268
4368
|
*/
|
|
4269
4369
|
dpi?: number
|
|
4270
4370
|
/**
|
|
4271
|
-
*
|
|
4371
|
+
* Factor to scale by.
|
|
4272
4372
|
*/
|
|
4273
4373
|
scale?: number
|
|
4274
4374
|
/**
|
|
4275
|
-
* Background
|
|
4375
|
+
* Background colour.
|
|
4276
4376
|
*/
|
|
4277
4377
|
background?: ArrayConstant
|
|
4278
4378
|
/**
|
|
4279
|
-
*
|
|
4379
|
+
* Password to decrypt with.
|
|
4280
4380
|
*/
|
|
4281
4381
|
password?: string
|
|
4282
4382
|
/**
|
|
@@ -4777,17 +4877,13 @@ declare module Vips {
|
|
|
4777
4877
|
*/
|
|
4778
4878
|
align?: Align | Enum
|
|
4779
4879
|
/**
|
|
4780
|
-
*
|
|
4880
|
+
* Justify lines.
|
|
4781
4881
|
*/
|
|
4782
|
-
|
|
4882
|
+
justify?: boolean
|
|
4783
4883
|
/**
|
|
4784
4884
|
* Dpi to render at.
|
|
4785
4885
|
*/
|
|
4786
4886
|
dpi?: number
|
|
4787
|
-
/**
|
|
4788
|
-
* Justify lines.
|
|
4789
|
-
*/
|
|
4790
|
-
justify?: boolean
|
|
4791
4887
|
/**
|
|
4792
4888
|
* Line spacing.
|
|
4793
4889
|
*/
|
|
@@ -4796,6 +4892,14 @@ declare module Vips {
|
|
|
4796
4892
|
* Load this font file.
|
|
4797
4893
|
*/
|
|
4798
4894
|
fontfile?: string
|
|
4895
|
+
/**
|
|
4896
|
+
* Enable rgba output.
|
|
4897
|
+
*/
|
|
4898
|
+
rgba?: boolean
|
|
4899
|
+
/**
|
|
4900
|
+
* Wrap lines on word or character boundaries.
|
|
4901
|
+
*/
|
|
4902
|
+
wrap?: TextWrap | Enum
|
|
4799
4903
|
/**
|
|
4800
4904
|
* Dpi selected by autofit (output).
|
|
4801
4905
|
*/
|
|
@@ -4956,15 +5060,15 @@ declare module Vips {
|
|
|
4956
5060
|
*/
|
|
4957
5061
|
static tiffload(filename: string, options?: {
|
|
4958
5062
|
/**
|
|
4959
|
-
*
|
|
5063
|
+
* First page to load.
|
|
4960
5064
|
*/
|
|
4961
5065
|
page?: number
|
|
4962
5066
|
/**
|
|
4963
|
-
*
|
|
5067
|
+
* Subifd index.
|
|
4964
5068
|
*/
|
|
4965
5069
|
subifd?: number
|
|
4966
5070
|
/**
|
|
4967
|
-
*
|
|
5071
|
+
* Number of pages to load, -1 for all.
|
|
4968
5072
|
*/
|
|
4969
5073
|
n?: number
|
|
4970
5074
|
/**
|
|
@@ -4997,15 +5101,15 @@ declare module Vips {
|
|
|
4997
5101
|
*/
|
|
4998
5102
|
static tiffloadBuffer(buffer: Blob, options?: {
|
|
4999
5103
|
/**
|
|
5000
|
-
*
|
|
5104
|
+
* First page to load.
|
|
5001
5105
|
*/
|
|
5002
5106
|
page?: number
|
|
5003
5107
|
/**
|
|
5004
|
-
*
|
|
5108
|
+
* Subifd index.
|
|
5005
5109
|
*/
|
|
5006
5110
|
subifd?: number
|
|
5007
5111
|
/**
|
|
5008
|
-
*
|
|
5112
|
+
* Number of pages to load, -1 for all.
|
|
5009
5113
|
*/
|
|
5010
5114
|
n?: number
|
|
5011
5115
|
/**
|
|
@@ -5038,15 +5142,15 @@ declare module Vips {
|
|
|
5038
5142
|
*/
|
|
5039
5143
|
static tiffloadSource(source: Source, options?: {
|
|
5040
5144
|
/**
|
|
5041
|
-
*
|
|
5145
|
+
* First page to load.
|
|
5042
5146
|
*/
|
|
5043
5147
|
page?: number
|
|
5044
5148
|
/**
|
|
5045
|
-
*
|
|
5149
|
+
* Subifd index.
|
|
5046
5150
|
*/
|
|
5047
5151
|
subifd?: number
|
|
5048
5152
|
/**
|
|
5049
|
-
*
|
|
5153
|
+
* Number of pages to load, -1 for all.
|
|
5050
5154
|
*/
|
|
5051
5155
|
n?: number
|
|
5052
5156
|
/**
|
|
@@ -5177,15 +5281,15 @@ declare module Vips {
|
|
|
5177
5281
|
*/
|
|
5178
5282
|
static webpload(filename: string, options?: {
|
|
5179
5283
|
/**
|
|
5180
|
-
*
|
|
5284
|
+
* First page to load.
|
|
5181
5285
|
*/
|
|
5182
5286
|
page?: number
|
|
5183
5287
|
/**
|
|
5184
|
-
*
|
|
5288
|
+
* Number of pages to load, -1 for all.
|
|
5185
5289
|
*/
|
|
5186
5290
|
n?: number
|
|
5187
5291
|
/**
|
|
5188
|
-
*
|
|
5292
|
+
* Factor to scale by.
|
|
5189
5293
|
*/
|
|
5190
5294
|
scale?: number
|
|
5191
5295
|
/**
|
|
@@ -5214,15 +5318,15 @@ declare module Vips {
|
|
|
5214
5318
|
*/
|
|
5215
5319
|
static webploadBuffer(buffer: Blob, options?: {
|
|
5216
5320
|
/**
|
|
5217
|
-
*
|
|
5321
|
+
* First page to load.
|
|
5218
5322
|
*/
|
|
5219
5323
|
page?: number
|
|
5220
5324
|
/**
|
|
5221
|
-
*
|
|
5325
|
+
* Number of pages to load, -1 for all.
|
|
5222
5326
|
*/
|
|
5223
5327
|
n?: number
|
|
5224
5328
|
/**
|
|
5225
|
-
*
|
|
5329
|
+
* Factor to scale by.
|
|
5226
5330
|
*/
|
|
5227
5331
|
scale?: number
|
|
5228
5332
|
/**
|
|
@@ -5251,15 +5355,15 @@ declare module Vips {
|
|
|
5251
5355
|
*/
|
|
5252
5356
|
static webploadSource(source: Source, options?: {
|
|
5253
5357
|
/**
|
|
5254
|
-
*
|
|
5358
|
+
* First page to load.
|
|
5255
5359
|
*/
|
|
5256
5360
|
page?: number
|
|
5257
5361
|
/**
|
|
5258
|
-
*
|
|
5362
|
+
* Number of pages to load, -1 for all.
|
|
5259
5363
|
*/
|
|
5260
5364
|
n?: number
|
|
5261
5365
|
/**
|
|
5262
|
-
*
|
|
5366
|
+
* Factor to scale by.
|
|
5263
5367
|
*/
|
|
5264
5368
|
scale?: number
|
|
5265
5369
|
/**
|
|
@@ -6512,13 +6616,17 @@ declare module Vips {
|
|
|
6512
6616
|
*/
|
|
6513
6617
|
interframe_maxerror?: number
|
|
6514
6618
|
/**
|
|
6515
|
-
*
|
|
6619
|
+
* Reuse palette from input.
|
|
6516
6620
|
*/
|
|
6517
|
-
|
|
6621
|
+
reuse?: boolean
|
|
6518
6622
|
/**
|
|
6519
6623
|
* Maximum inter-palette error for palette reusage.
|
|
6520
6624
|
*/
|
|
6521
6625
|
interpalette_maxerror?: number
|
|
6626
|
+
/**
|
|
6627
|
+
* Generate an interlaced (progressive) gif.
|
|
6628
|
+
*/
|
|
6629
|
+
interlace?: boolean
|
|
6522
6630
|
/**
|
|
6523
6631
|
* Strip all metadata from image.
|
|
6524
6632
|
*/
|
|
@@ -6556,13 +6664,17 @@ declare module Vips {
|
|
|
6556
6664
|
*/
|
|
6557
6665
|
interframe_maxerror?: number
|
|
6558
6666
|
/**
|
|
6559
|
-
*
|
|
6667
|
+
* Reuse palette from input.
|
|
6560
6668
|
*/
|
|
6561
|
-
|
|
6669
|
+
reuse?: boolean
|
|
6562
6670
|
/**
|
|
6563
6671
|
* Maximum inter-palette error for palette reusage.
|
|
6564
6672
|
*/
|
|
6565
6673
|
interpalette_maxerror?: number
|
|
6674
|
+
/**
|
|
6675
|
+
* Generate an interlaced (progressive) gif.
|
|
6676
|
+
*/
|
|
6677
|
+
interlace?: boolean
|
|
6566
6678
|
/**
|
|
6567
6679
|
* Strip all metadata from image.
|
|
6568
6680
|
*/
|
|
@@ -6600,13 +6712,17 @@ declare module Vips {
|
|
|
6600
6712
|
*/
|
|
6601
6713
|
interframe_maxerror?: number
|
|
6602
6714
|
/**
|
|
6603
|
-
*
|
|
6715
|
+
* Reuse palette from input.
|
|
6604
6716
|
*/
|
|
6605
|
-
|
|
6717
|
+
reuse?: boolean
|
|
6606
6718
|
/**
|
|
6607
6719
|
* Maximum inter-palette error for palette reusage.
|
|
6608
6720
|
*/
|
|
6609
6721
|
interpalette_maxerror?: number
|
|
6722
|
+
/**
|
|
6723
|
+
* Generate an interlaced (progressive) gif.
|
|
6724
|
+
*/
|
|
6725
|
+
interlace?: boolean
|
|
6610
6726
|
/**
|
|
6611
6727
|
* Strip all metadata from image.
|
|
6612
6728
|
*/
|
|
@@ -6695,6 +6811,10 @@ declare module Vips {
|
|
|
6695
6811
|
* Select chroma subsample operation mode.
|
|
6696
6812
|
*/
|
|
6697
6813
|
subsample_mode?: ForeignSubsample | Enum
|
|
6814
|
+
/**
|
|
6815
|
+
* Select encoder to use.
|
|
6816
|
+
*/
|
|
6817
|
+
encoder?: ForeignHeifEncoder | Enum
|
|
6698
6818
|
/**
|
|
6699
6819
|
* Strip all metadata from image.
|
|
6700
6820
|
*/
|
|
@@ -6739,6 +6859,10 @@ declare module Vips {
|
|
|
6739
6859
|
* Select chroma subsample operation mode.
|
|
6740
6860
|
*/
|
|
6741
6861
|
subsample_mode?: ForeignSubsample | Enum
|
|
6862
|
+
/**
|
|
6863
|
+
* Select encoder to use.
|
|
6864
|
+
*/
|
|
6865
|
+
encoder?: ForeignHeifEncoder | Enum
|
|
6742
6866
|
/**
|
|
6743
6867
|
* Strip all metadata from image.
|
|
6744
6868
|
*/
|
|
@@ -6783,6 +6907,10 @@ declare module Vips {
|
|
|
6783
6907
|
* Select chroma subsample operation mode.
|
|
6784
6908
|
*/
|
|
6785
6909
|
subsample_mode?: ForeignSubsample | Enum
|
|
6910
|
+
/**
|
|
6911
|
+
* Select encoder to use.
|
|
6912
|
+
*/
|
|
6913
|
+
encoder?: ForeignHeifEncoder | Enum
|
|
6786
6914
|
/**
|
|
6787
6915
|
* Strip all metadata from image.
|
|
6788
6916
|
*/
|
|
@@ -8864,6 +8992,14 @@ declare module Vips {
|
|
|
8864
8992
|
* How to measure interestingness.
|
|
8865
8993
|
*/
|
|
8866
8994
|
interesting?: Interesting | Enum
|
|
8995
|
+
/**
|
|
8996
|
+
* Horizontal position of attention centre (output).
|
|
8997
|
+
*/
|
|
8998
|
+
attention_x?: number | undefined
|
|
8999
|
+
/**
|
|
9000
|
+
* Vertical position of attention centre (output).
|
|
9001
|
+
*/
|
|
9002
|
+
attention_y?: number | undefined
|
|
8867
9003
|
}): Image;
|
|
8868
9004
|
|
|
8869
9005
|
/**
|
|
@@ -9396,7 +9532,7 @@ declare module Vips {
|
|
|
9396
9532
|
}): void;
|
|
9397
9533
|
|
|
9398
9534
|
/**
|
|
9399
|
-
* Save
|
|
9535
|
+
* Save as webp.
|
|
9400
9536
|
* @param filename Filename to save to.
|
|
9401
9537
|
* @param options Optional options.
|
|
9402
9538
|
*/
|
|
@@ -9464,7 +9600,7 @@ declare module Vips {
|
|
|
9464
9600
|
}): void;
|
|
9465
9601
|
|
|
9466
9602
|
/**
|
|
9467
|
-
* Save
|
|
9603
|
+
* Save as webp.
|
|
9468
9604
|
* @param options Optional options.
|
|
9469
9605
|
* @return Buffer to save to.
|
|
9470
9606
|
*/
|
|
@@ -9532,7 +9668,74 @@ declare module Vips {
|
|
|
9532
9668
|
}): Uint8Array;
|
|
9533
9669
|
|
|
9534
9670
|
/**
|
|
9535
|
-
* Save image to webp
|
|
9671
|
+
* Save image to webp mime.
|
|
9672
|
+
* @param options Optional options.
|
|
9673
|
+
*/
|
|
9674
|
+
webpsaveMime(options?: {
|
|
9675
|
+
/**
|
|
9676
|
+
* Q factor.
|
|
9677
|
+
*/
|
|
9678
|
+
Q?: number
|
|
9679
|
+
/**
|
|
9680
|
+
* Enable lossless compression.
|
|
9681
|
+
*/
|
|
9682
|
+
lossless?: boolean
|
|
9683
|
+
/**
|
|
9684
|
+
* Preset for lossy compression.
|
|
9685
|
+
*/
|
|
9686
|
+
preset?: ForeignWebpPreset | Enum
|
|
9687
|
+
/**
|
|
9688
|
+
* Enable high quality chroma subsampling.
|
|
9689
|
+
*/
|
|
9690
|
+
smart_subsample?: boolean
|
|
9691
|
+
/**
|
|
9692
|
+
* Enable preprocessing in lossless mode (uses q).
|
|
9693
|
+
*/
|
|
9694
|
+
near_lossless?: boolean
|
|
9695
|
+
/**
|
|
9696
|
+
* Change alpha plane fidelity for lossy compression.
|
|
9697
|
+
*/
|
|
9698
|
+
alpha_q?: number
|
|
9699
|
+
/**
|
|
9700
|
+
* Optimise for minimum size.
|
|
9701
|
+
*/
|
|
9702
|
+
min_size?: boolean
|
|
9703
|
+
/**
|
|
9704
|
+
* Minimum number of frames between key frames.
|
|
9705
|
+
*/
|
|
9706
|
+
kmin?: number
|
|
9707
|
+
/**
|
|
9708
|
+
* Maximum number of frames between key frames.
|
|
9709
|
+
*/
|
|
9710
|
+
kmax?: number
|
|
9711
|
+
/**
|
|
9712
|
+
* Level of cpu effort to reduce file size.
|
|
9713
|
+
*/
|
|
9714
|
+
effort?: number
|
|
9715
|
+
/**
|
|
9716
|
+
* Icc profile to embed.
|
|
9717
|
+
*/
|
|
9718
|
+
profile?: string
|
|
9719
|
+
/**
|
|
9720
|
+
* Allow mixed encoding (might reduce file size).
|
|
9721
|
+
*/
|
|
9722
|
+
mixed?: boolean
|
|
9723
|
+
/**
|
|
9724
|
+
* Strip all metadata from image.
|
|
9725
|
+
*/
|
|
9726
|
+
strip?: boolean
|
|
9727
|
+
/**
|
|
9728
|
+
* Background value.
|
|
9729
|
+
*/
|
|
9730
|
+
background?: ArrayConstant
|
|
9731
|
+
/**
|
|
9732
|
+
* Set page height for multipage save.
|
|
9733
|
+
*/
|
|
9734
|
+
page_height?: number
|
|
9735
|
+
}): void;
|
|
9736
|
+
|
|
9737
|
+
/**
|
|
9738
|
+
* Save as webp.
|
|
9536
9739
|
* @param target Target to save to.
|
|
9537
9740
|
* @param options Optional options.
|
|
9538
9741
|
*/
|