wasm-vips 0.0.12 → 0.0.14
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 +11 -7
- package/lib/vips-es6.js +211 -218
- package/lib/vips-heif.wasm +0 -0
- package/lib/vips-jxl.wasm +0 -0
- package/lib/vips-node.js +216 -215
- package/lib/vips-node.mjs +217 -215
- package/lib/vips-resvg.wasm +0 -0
- package/lib/vips.d.ts +258 -169
- package/lib/vips.js +211 -218
- package/lib/vips.wasm +0 -0
- package/package.json +1 -1
- package/versions.json +8 -8
package/lib/vips.d.ts
CHANGED
|
@@ -121,14 +121,22 @@ declare module Vips {
|
|
|
121
121
|
*/
|
|
122
122
|
abstract class EmbindClassHandle<T extends EmbindClassHandle<T>> {
|
|
123
123
|
/**
|
|
124
|
-
* Returns a new handle. It must eventually also be disposed with {@link
|
|
124
|
+
* Returns a new handle. It must eventually also be disposed with {@link [Symbol.dispose]} or
|
|
125
125
|
* {@link deleteLater}.
|
|
126
126
|
* @return A new handle.
|
|
127
127
|
*/
|
|
128
128
|
clone(): T;
|
|
129
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Support for `using ...`.
|
|
132
|
+
* See also: https://github.com/tc39/proposal-explicit-resource-management
|
|
133
|
+
*/
|
|
134
|
+
// @ts-ignore - If targeting lower than ESNext, this symbol might not exist.
|
|
135
|
+
[Symbol.dispose](): void;
|
|
136
|
+
|
|
130
137
|
/**
|
|
131
138
|
* Signal that a C++ object is no longer needed and can be deleted.
|
|
139
|
+
* Alias for {@link [Symbol.dispose]}.
|
|
132
140
|
*/
|
|
133
141
|
delete(): void;
|
|
134
142
|
|
|
@@ -1488,7 +1496,7 @@ declare module Vips {
|
|
|
1488
1496
|
* The format used for each band element.
|
|
1489
1497
|
*
|
|
1490
1498
|
* Each corresponds to a native C type for the current machine. For example,
|
|
1491
|
-
*
|
|
1499
|
+
* [enum@Vips.BandFormat.USHORT] is `unsigned short`.
|
|
1492
1500
|
*/
|
|
1493
1501
|
enum BandFormat {
|
|
1494
1502
|
/**
|
|
@@ -1534,12 +1542,11 @@ declare module Vips {
|
|
|
1534
1542
|
}
|
|
1535
1543
|
|
|
1536
1544
|
/**
|
|
1537
|
-
* The various Porter-Duff and PDF blend modes. See
|
|
1545
|
+
* The various Porter-Duff and PDF blend modes. See [func@Image.composite],
|
|
1538
1546
|
* for example.
|
|
1539
1547
|
*
|
|
1540
|
-
* The Cairo docs have a nice explanation of all the blend
|
|
1541
|
-
*
|
|
1542
|
-
* https://www.cairographics.org/operators
|
|
1548
|
+
* The Cairo docs have [a nice explanation of all the blend
|
|
1549
|
+
* modes](https://www.cairographics.org/operators).
|
|
1543
1550
|
*
|
|
1544
1551
|
* The non-separable modes are not implemented.
|
|
1545
1552
|
*/
|
|
@@ -1673,7 +1680,7 @@ declare module Vips {
|
|
|
1673
1680
|
|
|
1674
1681
|
/**
|
|
1675
1682
|
* How the values in an image should be interpreted. For example, a
|
|
1676
|
-
* three-band float image of type
|
|
1683
|
+
* three-band float image of type [enum@Vips.Interpretation.LAB] should have its
|
|
1677
1684
|
* pixels interpreted as coordinates in CIE Lab space.
|
|
1678
1685
|
*
|
|
1679
1686
|
* RGB and sRGB are treated in the same way. Use the colourspace functions if
|
|
@@ -1708,7 +1715,7 @@ declare module Vips {
|
|
|
1708
1715
|
*/
|
|
1709
1716
|
cmyk = 15, // 'cmyk'
|
|
1710
1717
|
/**
|
|
1711
|
-
* Implies
|
|
1718
|
+
* Implies [enum@Vips.Coding.LABQ]
|
|
1712
1719
|
*/
|
|
1713
1720
|
labq = 16, // 'labq'
|
|
1714
1721
|
/**
|
|
@@ -1762,126 +1769,81 @@ declare module Vips {
|
|
|
1762
1769
|
}
|
|
1763
1770
|
|
|
1764
1771
|
/**
|
|
1765
|
-
* See
|
|
1766
|
-
* the kind of demand geometry they prefer
|
|
1767
|
-
* to the VIPS image IO system.
|
|
1768
|
-
*
|
|
1769
|
-
* These demand styles are given below in order of increasing
|
|
1770
|
-
* specialisation. When demanding output from a pipeline,
|
|
1771
|
-
* vips_image_generate()
|
|
1772
|
-
* will use the most general style requested by the operations
|
|
1773
|
-
* in the pipeline.
|
|
1774
|
-
*
|
|
1775
|
-
* #VIPS_DEMAND_STYLE_SMALLTILE --- This is the most general demand format.
|
|
1776
|
-
* Output is demanded in small (around 100x100 pel) sections. This style works
|
|
1777
|
-
* reasonably efficiently, even for bizarre operations like 45 degree rotate.
|
|
1778
|
-
*
|
|
1779
|
-
* #VIPS_DEMAND_STYLE_FATSTRIP --- This operation would like to output strips
|
|
1780
|
-
* the width of the image and as high as possible. This option is suitable
|
|
1781
|
-
* for area operations which do not violently transform coordinates, such
|
|
1782
|
-
* as vips_conv().
|
|
1783
|
-
*
|
|
1784
|
-
* #VIPS_DEMAND_STYLE_THINSTRIP --- This operation would like to output strips
|
|
1785
|
-
* the width of the image and a few pels high. This option is suitable for
|
|
1786
|
-
* point-to-point operations, such as those in the arithmetic package.
|
|
1787
|
-
*
|
|
1788
|
-
* #VIPS_DEMAND_STYLE_ANY --- This image is not being demand-read from a disc
|
|
1789
|
-
* file (even indirectly) so any demand style is OK. It's used for things like
|
|
1790
|
-
* vips_black() where the pixels are calculated.
|
|
1791
|
-
*
|
|
1792
|
-
* See also: vips_image_pipelinev().
|
|
1793
|
-
*/
|
|
1794
|
-
enum DemandStyle {
|
|
1795
|
-
/**
|
|
1796
|
-
* Demand in small (typically 128x128 pixel) tiles
|
|
1797
|
-
*/
|
|
1798
|
-
smalltile = 0, // 'smalltile'
|
|
1799
|
-
/**
|
|
1800
|
-
* Demand in fat (typically 16 pixel high) strips
|
|
1801
|
-
*/
|
|
1802
|
-
fatstrip = 1, // 'fatstrip'
|
|
1803
|
-
/**
|
|
1804
|
-
* Demand in thin (typically 1 pixel high) strips
|
|
1805
|
-
*/
|
|
1806
|
-
thinstrip = 2 // 'thinstrip'
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* See also: vips_relational().
|
|
1772
|
+
* See also: [method@Image.relational].
|
|
1811
1773
|
*/
|
|
1812
1774
|
enum OperationRelational {
|
|
1813
1775
|
/**
|
|
1814
|
-
*
|
|
1776
|
+
* `==`
|
|
1815
1777
|
*/
|
|
1816
1778
|
equal = 0, // 'equal'
|
|
1817
1779
|
/**
|
|
1818
|
-
*
|
|
1780
|
+
* `!=`
|
|
1819
1781
|
*/
|
|
1820
1782
|
noteq = 1, // 'noteq'
|
|
1821
1783
|
/**
|
|
1822
|
-
*
|
|
1784
|
+
* `<`
|
|
1823
1785
|
*/
|
|
1824
1786
|
less = 2, // 'less'
|
|
1825
1787
|
/**
|
|
1826
|
-
*
|
|
1788
|
+
* `<=`
|
|
1827
1789
|
*/
|
|
1828
1790
|
lesseq = 3, // 'lesseq'
|
|
1829
1791
|
/**
|
|
1830
|
-
*
|
|
1792
|
+
* `>`
|
|
1831
1793
|
*/
|
|
1832
1794
|
more = 4, // 'more'
|
|
1833
1795
|
/**
|
|
1834
|
-
*
|
|
1796
|
+
* `>=`
|
|
1835
1797
|
*/
|
|
1836
1798
|
moreeq = 5 // 'moreeq'
|
|
1837
1799
|
}
|
|
1838
1800
|
|
|
1839
1801
|
/**
|
|
1840
|
-
* See also:
|
|
1802
|
+
* See also: [method@Image.boolean].
|
|
1841
1803
|
*/
|
|
1842
1804
|
enum OperationBoolean {
|
|
1843
1805
|
/**
|
|
1844
|
-
*
|
|
1806
|
+
* `&`
|
|
1845
1807
|
*/
|
|
1846
1808
|
and = 0, // 'and'
|
|
1847
1809
|
/**
|
|
1848
|
-
*
|
|
1810
|
+
* `|`
|
|
1849
1811
|
*/
|
|
1850
1812
|
or = 1, // 'or'
|
|
1851
1813
|
/**
|
|
1852
|
-
*
|
|
1814
|
+
* `^`
|
|
1853
1815
|
*/
|
|
1854
1816
|
eor = 2, // 'eor'
|
|
1855
1817
|
/**
|
|
1856
|
-
*
|
|
1818
|
+
* `>>`
|
|
1857
1819
|
*/
|
|
1858
1820
|
lshift = 3, // 'lshift'
|
|
1859
1821
|
/**
|
|
1860
|
-
*
|
|
1822
|
+
* `<<`
|
|
1861
1823
|
*/
|
|
1862
1824
|
rshift = 4 // 'rshift'
|
|
1863
1825
|
}
|
|
1864
1826
|
|
|
1865
1827
|
/**
|
|
1866
|
-
* See also:
|
|
1828
|
+
* See also: [method@Image.math].
|
|
1867
1829
|
*/
|
|
1868
1830
|
enum OperationMath2 {
|
|
1869
1831
|
/**
|
|
1870
|
-
*
|
|
1832
|
+
* `pow(left, right)`
|
|
1871
1833
|
*/
|
|
1872
1834
|
pow = 0, // 'pow'
|
|
1873
1835
|
/**
|
|
1874
|
-
*
|
|
1836
|
+
* `pow(right, left)`
|
|
1875
1837
|
*/
|
|
1876
1838
|
wop = 1, // 'wop'
|
|
1877
1839
|
/**
|
|
1878
|
-
*
|
|
1840
|
+
* `atan2(left, right)`
|
|
1879
1841
|
*/
|
|
1880
1842
|
atan2 = 2 // 'atan2'
|
|
1881
1843
|
}
|
|
1882
1844
|
|
|
1883
1845
|
/**
|
|
1884
|
-
* See also:
|
|
1846
|
+
* See also: [method@Image.complex2].
|
|
1885
1847
|
*/
|
|
1886
1848
|
enum OperationComplex2 {
|
|
1887
1849
|
/**
|
|
@@ -1891,31 +1853,31 @@ declare module Vips {
|
|
|
1891
1853
|
}
|
|
1892
1854
|
|
|
1893
1855
|
/**
|
|
1894
|
-
* See also:
|
|
1856
|
+
* See also: [method@Image.math].
|
|
1895
1857
|
*/
|
|
1896
1858
|
enum OperationMath {
|
|
1897
1859
|
/**
|
|
1898
|
-
*
|
|
1860
|
+
* `sin()`, angles in degrees
|
|
1899
1861
|
*/
|
|
1900
1862
|
sin = 0, // 'sin'
|
|
1901
1863
|
/**
|
|
1902
|
-
*
|
|
1864
|
+
* `cos()`, angles in degrees
|
|
1903
1865
|
*/
|
|
1904
1866
|
cos = 1, // 'cos'
|
|
1905
1867
|
/**
|
|
1906
|
-
*
|
|
1868
|
+
* `tan()`, angles in degrees
|
|
1907
1869
|
*/
|
|
1908
1870
|
tan = 2, // 'tan'
|
|
1909
1871
|
/**
|
|
1910
|
-
*
|
|
1872
|
+
* `asin()`, angles in degrees
|
|
1911
1873
|
*/
|
|
1912
1874
|
asin = 3, // 'asin'
|
|
1913
1875
|
/**
|
|
1914
|
-
*
|
|
1876
|
+
* `acos()`, angles in degrees
|
|
1915
1877
|
*/
|
|
1916
1878
|
acos = 4, // 'acos'
|
|
1917
1879
|
/**
|
|
1918
|
-
*
|
|
1880
|
+
* `atan()`, angles in degrees
|
|
1919
1881
|
*/
|
|
1920
1882
|
atan = 5, // 'atan'
|
|
1921
1883
|
/**
|
|
@@ -1935,33 +1897,33 @@ declare module Vips {
|
|
|
1935
1897
|
*/
|
|
1936
1898
|
exp10 = 9, // 'exp10'
|
|
1937
1899
|
/**
|
|
1938
|
-
*
|
|
1900
|
+
* `sinh()`, angles in radians
|
|
1939
1901
|
*/
|
|
1940
1902
|
sinh = 10, // 'sinh'
|
|
1941
1903
|
/**
|
|
1942
|
-
*
|
|
1904
|
+
* `cosh()`, angles in radians
|
|
1943
1905
|
*/
|
|
1944
1906
|
cosh = 11, // 'cosh'
|
|
1945
1907
|
/**
|
|
1946
|
-
*
|
|
1908
|
+
* `tanh()`, angles in radians
|
|
1947
1909
|
*/
|
|
1948
1910
|
tanh = 12, // 'tanh'
|
|
1949
1911
|
/**
|
|
1950
|
-
*
|
|
1912
|
+
* `asinh()`, angles in radians
|
|
1951
1913
|
*/
|
|
1952
1914
|
asinh = 13, // 'asinh'
|
|
1953
1915
|
/**
|
|
1954
|
-
*
|
|
1916
|
+
* `acosh()`, angles in radians
|
|
1955
1917
|
*/
|
|
1956
1918
|
acosh = 14, // 'acosh'
|
|
1957
1919
|
/**
|
|
1958
|
-
*
|
|
1920
|
+
* `atanh()`, angles in radians
|
|
1959
1921
|
*/
|
|
1960
1922
|
atanh = 15 // 'atanh'
|
|
1961
1923
|
}
|
|
1962
1924
|
|
|
1963
1925
|
/**
|
|
1964
|
-
* See also:
|
|
1926
|
+
* See also: [method@Image.round].
|
|
1965
1927
|
*/
|
|
1966
1928
|
enum OperationRound {
|
|
1967
1929
|
/**
|
|
@@ -1979,7 +1941,7 @@ declare module Vips {
|
|
|
1979
1941
|
}
|
|
1980
1942
|
|
|
1981
1943
|
/**
|
|
1982
|
-
* See also:
|
|
1944
|
+
* See also: [method@Image.complex].
|
|
1983
1945
|
*/
|
|
1984
1946
|
enum OperationComplex {
|
|
1985
1947
|
/**
|
|
@@ -1997,7 +1959,7 @@ declare module Vips {
|
|
|
1997
1959
|
}
|
|
1998
1960
|
|
|
1999
1961
|
/**
|
|
2000
|
-
* See also:
|
|
1962
|
+
* See also: [method@Image.complexget].
|
|
2001
1963
|
*/
|
|
2002
1964
|
enum OperationComplexget {
|
|
2003
1965
|
/**
|
|
@@ -2011,7 +1973,7 @@ declare module Vips {
|
|
|
2011
1973
|
}
|
|
2012
1974
|
|
|
2013
1975
|
/**
|
|
2014
|
-
* How to combine values. See
|
|
1976
|
+
* How to combine values. See [method@Image.compass], for example.
|
|
2015
1977
|
*/
|
|
2016
1978
|
enum Combine {
|
|
2017
1979
|
/**
|
|
@@ -2029,12 +1991,12 @@ declare module Vips {
|
|
|
2029
1991
|
}
|
|
2030
1992
|
|
|
2031
1993
|
/**
|
|
2032
|
-
* The type of access an operation has to supply. See
|
|
2033
|
-
* and
|
|
1994
|
+
* The type of access an operation has to supply. See [method@Image.tilecache]
|
|
1995
|
+
* and [class@Foreign].
|
|
2034
1996
|
*
|
|
2035
|
-
* @
|
|
1997
|
+
* [enum@Vips.Access.RANDOM] means requests can come in any order.
|
|
2036
1998
|
*
|
|
2037
|
-
* @
|
|
1999
|
+
* [enum@Vips.Access.SEQUENTIAL] means requests will be top-to-bottom, but with some
|
|
2038
2000
|
* amount of buffering behind the read point for small non-local accesses.
|
|
2039
2001
|
*/
|
|
2040
2002
|
enum Access {
|
|
@@ -2050,29 +2012,30 @@ declare module Vips {
|
|
|
2050
2012
|
}
|
|
2051
2013
|
|
|
2052
2014
|
/**
|
|
2053
|
-
* See
|
|
2015
|
+
* See [method@Image.embed], [method@Image.conv], [method@Image.affine] and so on.
|
|
2054
2016
|
*
|
|
2055
2017
|
* When the edges of an image are extended, you can specify
|
|
2056
2018
|
* how you want the extension done.
|
|
2057
2019
|
*
|
|
2058
|
-
*
|
|
2020
|
+
* [enum@Vips.Extend.BLACK] -- new pixels are black, ie. all bits are zero.
|
|
2059
2021
|
*
|
|
2060
|
-
*
|
|
2022
|
+
* [enum@Vips.Extend.COPY] -- each new pixel takes the value of the nearest edge
|
|
2061
2023
|
* pixel
|
|
2062
2024
|
*
|
|
2063
|
-
*
|
|
2025
|
+
* [enum@Vips.Extend.REPEAT] -- the image is tiled to fill the new area
|
|
2064
2026
|
*
|
|
2065
|
-
*
|
|
2027
|
+
* [enum@Vips.Extend.MIRROR] -- the image is reflected and tiled to reduce hash
|
|
2066
2028
|
* edges
|
|
2067
2029
|
*
|
|
2068
|
-
*
|
|
2030
|
+
* [enum@Vips.Extend.WHITE] -- new pixels are white, ie. all bits are set
|
|
2069
2031
|
*
|
|
2070
|
-
*
|
|
2032
|
+
* [enum@Vips.Extend.BACKGROUND] -- colour set from the @background property
|
|
2071
2033
|
*
|
|
2072
2034
|
* We have to specify the exact value of each enum member since we have to
|
|
2073
2035
|
* keep these frozen for back compat with vips7.
|
|
2074
2036
|
*
|
|
2075
|
-
*
|
|
2037
|
+
* ::: seealso
|
|
2038
|
+
* [method@Image.embed].
|
|
2076
2039
|
*/
|
|
2077
2040
|
enum Extend {
|
|
2078
2041
|
/**
|
|
@@ -2102,7 +2065,7 @@ declare module Vips {
|
|
|
2102
2065
|
}
|
|
2103
2066
|
|
|
2104
2067
|
/**
|
|
2105
|
-
* A direction on a compass. Used for
|
|
2068
|
+
* A direction on a compass. Used for [method@Image.gravity], for example.
|
|
2106
2069
|
*/
|
|
2107
2070
|
enum CompassDirection {
|
|
2108
2071
|
/**
|
|
@@ -2144,12 +2107,13 @@ declare module Vips {
|
|
|
2144
2107
|
}
|
|
2145
2108
|
|
|
2146
2109
|
/**
|
|
2147
|
-
* See
|
|
2110
|
+
* See [method@Image.flip], [method@Image.join] and so on.
|
|
2148
2111
|
*
|
|
2149
|
-
* Operations like
|
|
2112
|
+
* Operations like [method@Image.flip] need to be told whether to flip left-right or
|
|
2150
2113
|
* top-bottom.
|
|
2151
2114
|
*
|
|
2152
|
-
*
|
|
2115
|
+
* ::: seealso
|
|
2116
|
+
* [method@Image.flip], [method@Image.join].
|
|
2153
2117
|
*/
|
|
2154
2118
|
enum Direction {
|
|
2155
2119
|
/**
|
|
@@ -2163,12 +2127,13 @@ declare module Vips {
|
|
|
2163
2127
|
}
|
|
2164
2128
|
|
|
2165
2129
|
/**
|
|
2166
|
-
* See
|
|
2130
|
+
* See [method@Image.join] and so on.
|
|
2167
2131
|
*
|
|
2168
|
-
* Operations like
|
|
2132
|
+
* Operations like [method@Image.join] need to be told whether to align images on the
|
|
2169
2133
|
* low or high coordinate edge, or centre.
|
|
2170
2134
|
*
|
|
2171
|
-
*
|
|
2135
|
+
* ::: seealso
|
|
2136
|
+
* [method@Image.join].
|
|
2172
2137
|
*/
|
|
2173
2138
|
enum Align {
|
|
2174
2139
|
/**
|
|
@@ -2187,14 +2152,15 @@ declare module Vips {
|
|
|
2187
2152
|
|
|
2188
2153
|
/**
|
|
2189
2154
|
* Pick the algorithm vips uses to decide image "interestingness". This is used
|
|
2190
|
-
* by
|
|
2155
|
+
* by [method@Image.smartcrop], for example, to decide what parts of the image to
|
|
2191
2156
|
* keep.
|
|
2192
2157
|
*
|
|
2193
|
-
*
|
|
2194
|
-
* crop is positioned at the top or left.
|
|
2158
|
+
* [enum@Vips.Interesting.NONE] and [enum@Vips.Interesting.LOW] mean the same -- the
|
|
2159
|
+
* crop is positioned at the top or left. [enum@Vips.Interesting.HIGH] positions at
|
|
2195
2160
|
* the bottom or right.
|
|
2196
2161
|
*
|
|
2197
|
-
*
|
|
2162
|
+
* ::: seealso
|
|
2163
|
+
* [method@Image.smartcrop].
|
|
2198
2164
|
*/
|
|
2199
2165
|
enum Interesting {
|
|
2200
2166
|
/**
|
|
@@ -2228,11 +2194,12 @@ declare module Vips {
|
|
|
2228
2194
|
}
|
|
2229
2195
|
|
|
2230
2196
|
/**
|
|
2231
|
-
* See
|
|
2197
|
+
* See [method@Image.rot] and so on.
|
|
2232
2198
|
*
|
|
2233
2199
|
* Fixed rotate angles.
|
|
2234
2200
|
*
|
|
2235
|
-
*
|
|
2201
|
+
* ::: seealso
|
|
2202
|
+
* [method@Image.rot].
|
|
2236
2203
|
*/
|
|
2237
2204
|
enum Angle {
|
|
2238
2205
|
/**
|
|
@@ -2254,11 +2221,12 @@ declare module Vips {
|
|
|
2254
2221
|
}
|
|
2255
2222
|
|
|
2256
2223
|
/**
|
|
2257
|
-
* See
|
|
2224
|
+
* See [method@Image.rot45] and so on.
|
|
2258
2225
|
*
|
|
2259
2226
|
* Fixed rotate angles.
|
|
2260
2227
|
*
|
|
2261
|
-
*
|
|
2228
|
+
* ::: seealso
|
|
2229
|
+
* [method@Image.rot45].
|
|
2262
2230
|
*/
|
|
2263
2231
|
enum Angle45 {
|
|
2264
2232
|
/**
|
|
@@ -2314,10 +2282,11 @@ declare module Vips {
|
|
|
2314
2282
|
}
|
|
2315
2283
|
|
|
2316
2284
|
/**
|
|
2317
|
-
* Sets the word wrapping style for
|
|
2285
|
+
* Sets the word wrapping style for [ctor@Image.text] when used with a maximum
|
|
2318
2286
|
* width.
|
|
2319
2287
|
*
|
|
2320
|
-
*
|
|
2288
|
+
* ::: seealso
|
|
2289
|
+
* [ctor@Image.text].
|
|
2321
2290
|
*/
|
|
2322
2291
|
enum TextWrap {
|
|
2323
2292
|
/**
|
|
@@ -2341,7 +2310,8 @@ declare module Vips {
|
|
|
2341
2310
|
/**
|
|
2342
2311
|
* The SDF to generate,
|
|
2343
2312
|
*
|
|
2344
|
-
*
|
|
2313
|
+
* ::: seealso
|
|
2314
|
+
* [ctor@Image.sdf].
|
|
2345
2315
|
*/
|
|
2346
2316
|
enum SdfShape {
|
|
2347
2317
|
/**
|
|
@@ -2366,8 +2336,8 @@ declare module Vips {
|
|
|
2366
2336
|
* How sensitive loaders are to errors, from never stop (very insensitive), to
|
|
2367
2337
|
* stop on the smallest warning (very sensitive).
|
|
2368
2338
|
*
|
|
2369
|
-
* Each one implies the ones before it, so
|
|
2370
|
-
*
|
|
2339
|
+
* Each one implies the ones before it, so [enum@Vips.FailOn.ERROR] implies
|
|
2340
|
+
* [enum@Vips.FailOn.TRUNCATED].
|
|
2371
2341
|
*/
|
|
2372
2342
|
enum FailOn {
|
|
2373
2343
|
/**
|
|
@@ -2391,15 +2361,15 @@ declare module Vips {
|
|
|
2391
2361
|
/**
|
|
2392
2362
|
* The netpbm file format to save as.
|
|
2393
2363
|
*
|
|
2394
|
-
*
|
|
2364
|
+
* [enum@Vips.ForeignPpmFormat.PBM] images are single bit.
|
|
2395
2365
|
*
|
|
2396
|
-
*
|
|
2366
|
+
* [enum@Vips.ForeignPpmFormat.PGM] images are 8, 16, or 32-bits, one band.
|
|
2397
2367
|
*
|
|
2398
|
-
*
|
|
2368
|
+
* [enum@Vips.ForeignPpmFormat.PPM] images are 8, 16, or 32-bits, three bands.
|
|
2399
2369
|
*
|
|
2400
|
-
*
|
|
2370
|
+
* [enum@Vips.ForeignPpmFormat.PFM] images are 32-bit float pixels.
|
|
2401
2371
|
*
|
|
2402
|
-
*
|
|
2372
|
+
* [enum@Vips.ForeignPpmFormat.PNM] images are anymap images -- the image format
|
|
2403
2373
|
* is used to pick the saver.
|
|
2404
2374
|
*/
|
|
2405
2375
|
enum ForeignPpmFormat {
|
|
@@ -2651,7 +2621,7 @@ declare module Vips {
|
|
|
2651
2621
|
/**
|
|
2652
2622
|
* The compression format to use inside a HEIF container.
|
|
2653
2623
|
*
|
|
2654
|
-
* This is assumed to use the same numbering as
|
|
2624
|
+
* This is assumed to use the same numbering as `heif_compression_format`.
|
|
2655
2625
|
*/
|
|
2656
2626
|
enum ForeignHeifCompression {
|
|
2657
2627
|
/**
|
|
@@ -2704,7 +2674,8 @@ declare module Vips {
|
|
|
2704
2674
|
* Controls whether an operation should upsize, downsize, both up and
|
|
2705
2675
|
* downsize, or force a size.
|
|
2706
2676
|
*
|
|
2707
|
-
*
|
|
2677
|
+
* ::: seealso
|
|
2678
|
+
* [ctor@Image.thumbnail].
|
|
2708
2679
|
*/
|
|
2709
2680
|
enum Size {
|
|
2710
2681
|
/**
|
|
@@ -2726,8 +2697,8 @@ declare module Vips {
|
|
|
2726
2697
|
}
|
|
2727
2698
|
|
|
2728
2699
|
/**
|
|
2729
|
-
* The rendering intent.
|
|
2730
|
-
* scientific work,
|
|
2700
|
+
* The rendering intent. [enum@Vips.Intent.ABSOLUTE] is best for
|
|
2701
|
+
* scientific work, [enum@Vips.Intent.RELATIVE] is usually best for
|
|
2731
2702
|
* accurate communication with other imaging libraries.
|
|
2732
2703
|
*/
|
|
2733
2704
|
enum Intent {
|
|
@@ -2746,11 +2717,15 @@ declare module Vips {
|
|
|
2746
2717
|
/**
|
|
2747
2718
|
* Absolute colorimetric rendering intent
|
|
2748
2719
|
*/
|
|
2749
|
-
absolute = 3 // 'absolute'
|
|
2720
|
+
absolute = 3, // 'absolute'
|
|
2721
|
+
/**
|
|
2722
|
+
* The rendering intent that the profile suggests
|
|
2723
|
+
*/
|
|
2724
|
+
auto = 32 // 'auto'
|
|
2750
2725
|
}
|
|
2751
2726
|
|
|
2752
2727
|
/**
|
|
2753
|
-
* The resampling kernels vips supports. See
|
|
2728
|
+
* The resampling kernels vips supports. See [method@Image.reduce], for example.
|
|
2754
2729
|
*/
|
|
2755
2730
|
enum Kernel {
|
|
2756
2731
|
/**
|
|
@@ -2776,12 +2751,20 @@ declare module Vips {
|
|
|
2776
2751
|
/**
|
|
2777
2752
|
* Convolve with a three-lobe Lanczos kernel.
|
|
2778
2753
|
*/
|
|
2779
|
-
lanczos3 = 5 // 'lanczos3'
|
|
2754
|
+
lanczos3 = 5, // 'lanczos3'
|
|
2755
|
+
/**
|
|
2756
|
+
* Convolve with Magic Kernel Sharp 2013.
|
|
2757
|
+
*/
|
|
2758
|
+
mks2013 = 6, // 'mks2013'
|
|
2759
|
+
/**
|
|
2760
|
+
* Convolve with Magic Kernel Sharp 2021.
|
|
2761
|
+
*/
|
|
2762
|
+
mks2021 = 7 // 'mks2021'
|
|
2780
2763
|
}
|
|
2781
2764
|
|
|
2782
2765
|
/**
|
|
2783
|
-
* Pick a Profile Connection Space for
|
|
2784
|
-
*
|
|
2766
|
+
* Pick a Profile Connection Space for [method@Image.icc_import] and
|
|
2767
|
+
* [method@Image.icc_export]. LAB is usually best, XYZ can be more convenient in some
|
|
2785
2768
|
* cases.
|
|
2786
2769
|
*/
|
|
2787
2770
|
enum PCS {
|
|
@@ -2798,7 +2781,8 @@ declare module Vips {
|
|
|
2798
2781
|
/**
|
|
2799
2782
|
* More like hit-miss, really.
|
|
2800
2783
|
*
|
|
2801
|
-
*
|
|
2784
|
+
* ::: seealso
|
|
2785
|
+
* [method@Image.morph].
|
|
2802
2786
|
*/
|
|
2803
2787
|
enum OperationMorphology {
|
|
2804
2788
|
/**
|
|
@@ -2812,12 +2796,13 @@ declare module Vips {
|
|
|
2812
2796
|
}
|
|
2813
2797
|
|
|
2814
2798
|
/**
|
|
2815
|
-
* See
|
|
2799
|
+
* See [method@Image.draw_image] and so on.
|
|
2816
2800
|
*
|
|
2817
|
-
* Operations like
|
|
2801
|
+
* Operations like [method@Image.draw_image] need to be told how to combine images
|
|
2818
2802
|
* from two sources.
|
|
2819
2803
|
*
|
|
2820
|
-
*
|
|
2804
|
+
* ::: seealso
|
|
2805
|
+
* [method@Image.join].
|
|
2821
2806
|
*/
|
|
2822
2807
|
enum CombineMode {
|
|
2823
2808
|
/**
|
|
@@ -3508,6 +3493,10 @@ declare module Vips {
|
|
|
3508
3493
|
* Load this page from the image.
|
|
3509
3494
|
*/
|
|
3510
3495
|
page?: number
|
|
3496
|
+
/**
|
|
3497
|
+
* Load images a frame at a time.
|
|
3498
|
+
*/
|
|
3499
|
+
oneshot?: boolean
|
|
3511
3500
|
/**
|
|
3512
3501
|
* Force open via memory.
|
|
3513
3502
|
*/
|
|
@@ -3541,6 +3530,10 @@ declare module Vips {
|
|
|
3541
3530
|
* Load this page from the image.
|
|
3542
3531
|
*/
|
|
3543
3532
|
page?: number
|
|
3533
|
+
/**
|
|
3534
|
+
* Load images a frame at a time.
|
|
3535
|
+
*/
|
|
3536
|
+
oneshot?: boolean
|
|
3544
3537
|
/**
|
|
3545
3538
|
* Force open via memory.
|
|
3546
3539
|
*/
|
|
@@ -3574,6 +3567,10 @@ declare module Vips {
|
|
|
3574
3567
|
* Load this page from the image.
|
|
3575
3568
|
*/
|
|
3576
3569
|
page?: number
|
|
3570
|
+
/**
|
|
3571
|
+
* Load images a frame at a time.
|
|
3572
|
+
*/
|
|
3573
|
+
oneshot?: boolean
|
|
3577
3574
|
/**
|
|
3578
3575
|
* Force open via memory.
|
|
3579
3576
|
*/
|
|
@@ -4800,7 +4797,36 @@ declare module Vips {
|
|
|
4800
4797
|
}): Image;
|
|
4801
4798
|
|
|
4802
4799
|
/**
|
|
4803
|
-
* Load ppm
|
|
4800
|
+
* Load ppm from buffer.
|
|
4801
|
+
* @param buffer Buffer to load from.
|
|
4802
|
+
* @param options Optional options.
|
|
4803
|
+
* @return Output image.
|
|
4804
|
+
*/
|
|
4805
|
+
static ppmloadBuffer(buffer: Blob, options?: {
|
|
4806
|
+
/**
|
|
4807
|
+
* Force open via memory.
|
|
4808
|
+
*/
|
|
4809
|
+
memory?: boolean
|
|
4810
|
+
/**
|
|
4811
|
+
* Required access pattern for this file.
|
|
4812
|
+
*/
|
|
4813
|
+
access?: Access | Enum
|
|
4814
|
+
/**
|
|
4815
|
+
* Error level to fail on.
|
|
4816
|
+
*/
|
|
4817
|
+
fail_on?: FailOn | Enum
|
|
4818
|
+
/**
|
|
4819
|
+
* Don't use a cached result for this operation.
|
|
4820
|
+
*/
|
|
4821
|
+
revalidate?: boolean
|
|
4822
|
+
/**
|
|
4823
|
+
* Flags for this file (output).
|
|
4824
|
+
*/
|
|
4825
|
+
flags?: number | undefined
|
|
4826
|
+
}): Image;
|
|
4827
|
+
|
|
4828
|
+
/**
|
|
4829
|
+
* Load ppm from source.
|
|
4804
4830
|
* @param source Source to load from.
|
|
4805
4831
|
* @param options Optional options.
|
|
4806
4832
|
* @return Output image.
|
|
@@ -5041,6 +5067,14 @@ declare module Vips {
|
|
|
5041
5067
|
* Allow svg of any size.
|
|
5042
5068
|
*/
|
|
5043
5069
|
unlimited?: boolean
|
|
5070
|
+
/**
|
|
5071
|
+
* Custom css.
|
|
5072
|
+
*/
|
|
5073
|
+
stylesheet?: string
|
|
5074
|
+
/**
|
|
5075
|
+
* Enable scrgb 128-bit output (32-bit per channel).
|
|
5076
|
+
*/
|
|
5077
|
+
high_bitdepth?: boolean
|
|
5044
5078
|
/**
|
|
5045
5079
|
* Force open via memory.
|
|
5046
5080
|
*/
|
|
@@ -5082,6 +5116,14 @@ declare module Vips {
|
|
|
5082
5116
|
* Allow svg of any size.
|
|
5083
5117
|
*/
|
|
5084
5118
|
unlimited?: boolean
|
|
5119
|
+
/**
|
|
5120
|
+
* Custom css.
|
|
5121
|
+
*/
|
|
5122
|
+
stylesheet?: string
|
|
5123
|
+
/**
|
|
5124
|
+
* Enable scrgb 128-bit output (32-bit per channel).
|
|
5125
|
+
*/
|
|
5126
|
+
high_bitdepth?: boolean
|
|
5085
5127
|
/**
|
|
5086
5128
|
* Force open via memory.
|
|
5087
5129
|
*/
|
|
@@ -5123,6 +5165,14 @@ declare module Vips {
|
|
|
5123
5165
|
* Allow svg of any size.
|
|
5124
5166
|
*/
|
|
5125
5167
|
unlimited?: boolean
|
|
5168
|
+
/**
|
|
5169
|
+
* Custom css.
|
|
5170
|
+
*/
|
|
5171
|
+
stylesheet?: string
|
|
5172
|
+
/**
|
|
5173
|
+
* Enable scrgb 128-bit output (32-bit per channel).
|
|
5174
|
+
*/
|
|
5175
|
+
high_bitdepth?: boolean
|
|
5126
5176
|
/**
|
|
5127
5177
|
* Force open via memory.
|
|
5128
5178
|
*/
|
|
@@ -5262,13 +5312,13 @@ declare module Vips {
|
|
|
5262
5312
|
*/
|
|
5263
5313
|
linear?: boolean
|
|
5264
5314
|
/**
|
|
5265
|
-
* Fallback
|
|
5315
|
+
* Fallback input profile.
|
|
5266
5316
|
*/
|
|
5267
|
-
|
|
5317
|
+
input_profile?: string
|
|
5268
5318
|
/**
|
|
5269
|
-
* Fallback
|
|
5319
|
+
* Fallback output profile.
|
|
5270
5320
|
*/
|
|
5271
|
-
|
|
5321
|
+
output_profile?: string
|
|
5272
5322
|
/**
|
|
5273
5323
|
* Rendering intent.
|
|
5274
5324
|
*/
|
|
@@ -5312,13 +5362,13 @@ declare module Vips {
|
|
|
5312
5362
|
*/
|
|
5313
5363
|
linear?: boolean
|
|
5314
5364
|
/**
|
|
5315
|
-
* Fallback
|
|
5365
|
+
* Fallback input profile.
|
|
5316
5366
|
*/
|
|
5317
|
-
|
|
5367
|
+
input_profile?: string
|
|
5318
5368
|
/**
|
|
5319
|
-
* Fallback
|
|
5369
|
+
* Fallback output profile.
|
|
5320
5370
|
*/
|
|
5321
|
-
|
|
5371
|
+
output_profile?: string
|
|
5322
5372
|
/**
|
|
5323
5373
|
* Rendering intent.
|
|
5324
5374
|
*/
|
|
@@ -5362,13 +5412,13 @@ declare module Vips {
|
|
|
5362
5412
|
*/
|
|
5363
5413
|
linear?: boolean
|
|
5364
5414
|
/**
|
|
5365
|
-
* Fallback
|
|
5415
|
+
* Fallback input profile.
|
|
5366
5416
|
*/
|
|
5367
|
-
|
|
5417
|
+
input_profile?: string
|
|
5368
5418
|
/**
|
|
5369
|
-
* Fallback
|
|
5419
|
+
* Fallback output profile.
|
|
5370
5420
|
*/
|
|
5371
|
-
|
|
5421
|
+
output_profile?: string
|
|
5372
5422
|
/**
|
|
5373
5423
|
* Rendering intent.
|
|
5374
5424
|
*/
|
|
@@ -5390,10 +5440,6 @@ declare module Vips {
|
|
|
5390
5440
|
* First page to load.
|
|
5391
5441
|
*/
|
|
5392
5442
|
page?: number
|
|
5393
|
-
/**
|
|
5394
|
-
* Subifd index.
|
|
5395
|
-
*/
|
|
5396
|
-
subifd?: number
|
|
5397
5443
|
/**
|
|
5398
5444
|
* Number of pages to load, -1 for all.
|
|
5399
5445
|
*/
|
|
@@ -5402,6 +5448,14 @@ declare module Vips {
|
|
|
5402
5448
|
* Rotate image using orientation tag.
|
|
5403
5449
|
*/
|
|
5404
5450
|
autorotate?: boolean
|
|
5451
|
+
/**
|
|
5452
|
+
* Subifd index.
|
|
5453
|
+
*/
|
|
5454
|
+
subifd?: number
|
|
5455
|
+
/**
|
|
5456
|
+
* Remove all denial of service limits.
|
|
5457
|
+
*/
|
|
5458
|
+
unlimited?: boolean
|
|
5405
5459
|
/**
|
|
5406
5460
|
* Force open via memory.
|
|
5407
5461
|
*/
|
|
@@ -5435,10 +5489,6 @@ declare module Vips {
|
|
|
5435
5489
|
* First page to load.
|
|
5436
5490
|
*/
|
|
5437
5491
|
page?: number
|
|
5438
|
-
/**
|
|
5439
|
-
* Subifd index.
|
|
5440
|
-
*/
|
|
5441
|
-
subifd?: number
|
|
5442
5492
|
/**
|
|
5443
5493
|
* Number of pages to load, -1 for all.
|
|
5444
5494
|
*/
|
|
@@ -5447,6 +5497,14 @@ declare module Vips {
|
|
|
5447
5497
|
* Rotate image using orientation tag.
|
|
5448
5498
|
*/
|
|
5449
5499
|
autorotate?: boolean
|
|
5500
|
+
/**
|
|
5501
|
+
* Subifd index.
|
|
5502
|
+
*/
|
|
5503
|
+
subifd?: number
|
|
5504
|
+
/**
|
|
5505
|
+
* Remove all denial of service limits.
|
|
5506
|
+
*/
|
|
5507
|
+
unlimited?: boolean
|
|
5450
5508
|
/**
|
|
5451
5509
|
* Force open via memory.
|
|
5452
5510
|
*/
|
|
@@ -5480,10 +5538,6 @@ declare module Vips {
|
|
|
5480
5538
|
* First page to load.
|
|
5481
5539
|
*/
|
|
5482
5540
|
page?: number
|
|
5483
|
-
/**
|
|
5484
|
-
* Subifd index.
|
|
5485
|
-
*/
|
|
5486
|
-
subifd?: number
|
|
5487
5541
|
/**
|
|
5488
5542
|
* Number of pages to load, -1 for all.
|
|
5489
5543
|
*/
|
|
@@ -5492,6 +5546,14 @@ declare module Vips {
|
|
|
5492
5546
|
* Rotate image using orientation tag.
|
|
5493
5547
|
*/
|
|
5494
5548
|
autorotate?: boolean
|
|
5549
|
+
/**
|
|
5550
|
+
* Subifd index.
|
|
5551
|
+
*/
|
|
5552
|
+
subifd?: number
|
|
5553
|
+
/**
|
|
5554
|
+
* Remove all denial of service limits.
|
|
5555
|
+
*/
|
|
5556
|
+
unlimited?: boolean
|
|
5495
5557
|
/**
|
|
5496
5558
|
* Force open via memory.
|
|
5497
5559
|
*/
|
|
@@ -7018,6 +7080,10 @@ declare module Vips {
|
|
|
7018
7080
|
* Generate an interlaced (progressive) gif.
|
|
7019
7081
|
*/
|
|
7020
7082
|
interlace?: boolean
|
|
7083
|
+
/**
|
|
7084
|
+
* Keep duplicate frames in the output instead of combining them.
|
|
7085
|
+
*/
|
|
7086
|
+
keep_duplicate_frames?: boolean
|
|
7021
7087
|
/**
|
|
7022
7088
|
* Which metadata to retain.
|
|
7023
7089
|
*/
|
|
@@ -7070,6 +7136,10 @@ declare module Vips {
|
|
|
7070
7136
|
* Generate an interlaced (progressive) gif.
|
|
7071
7137
|
*/
|
|
7072
7138
|
interlace?: boolean
|
|
7139
|
+
/**
|
|
7140
|
+
* Keep duplicate frames in the output instead of combining them.
|
|
7141
|
+
*/
|
|
7142
|
+
keep_duplicate_frames?: boolean
|
|
7073
7143
|
/**
|
|
7074
7144
|
* Which metadata to retain.
|
|
7075
7145
|
*/
|
|
@@ -7122,6 +7192,10 @@ declare module Vips {
|
|
|
7122
7192
|
* Generate an interlaced (progressive) gif.
|
|
7123
7193
|
*/
|
|
7124
7194
|
interlace?: boolean
|
|
7195
|
+
/**
|
|
7196
|
+
* Keep duplicate frames in the output instead of combining them.
|
|
7197
|
+
*/
|
|
7198
|
+
keep_duplicate_frames?: boolean
|
|
7125
7199
|
/**
|
|
7126
7200
|
* Which metadata to retain.
|
|
7127
7201
|
*/
|
|
@@ -8382,11 +8456,18 @@ declare module Vips {
|
|
|
8382
8456
|
math2(right: Image | ArrayConstant, math2: OperationMath2 | Enum): Image;
|
|
8383
8457
|
|
|
8384
8458
|
/**
|
|
8385
|
-
* Invert
|
|
8459
|
+
* Invert a matrix.
|
|
8386
8460
|
* @return Output matrix.
|
|
8387
8461
|
*/
|
|
8388
8462
|
matrixinvert(): Image;
|
|
8389
8463
|
|
|
8464
|
+
/**
|
|
8465
|
+
* Multiply two matrices.
|
|
8466
|
+
* @param right Second matrix to multiply.
|
|
8467
|
+
* @return Output matrix.
|
|
8468
|
+
*/
|
|
8469
|
+
matrixmultiply(right: Image | ArrayConstant): Image;
|
|
8470
|
+
|
|
8390
8471
|
/**
|
|
8391
8472
|
* Print matrix.
|
|
8392
8473
|
* @param options Optional options.
|
|
@@ -9239,6 +9320,14 @@ declare module Vips {
|
|
|
9239
9320
|
*/
|
|
9240
9321
|
remainder(right: Image | ArrayConstant): Image;
|
|
9241
9322
|
|
|
9323
|
+
/**
|
|
9324
|
+
* Rebuild an mosaiced image.
|
|
9325
|
+
* @param old_str Search for this string.
|
|
9326
|
+
* @param new_str And swap for this string.
|
|
9327
|
+
* @return Output image.
|
|
9328
|
+
*/
|
|
9329
|
+
remosaic(old_str: string, new_str: string): Image;
|
|
9330
|
+
|
|
9242
9331
|
/**
|
|
9243
9332
|
* Replicate an image.
|
|
9244
9333
|
* @param across Repeat this many times horizontally.
|
|
@@ -9358,7 +9447,7 @@ declare module Vips {
|
|
|
9358
9447
|
scRGB2XYZ(): Image;
|
|
9359
9448
|
|
|
9360
9449
|
/**
|
|
9361
|
-
* Convert
|
|
9450
|
+
* Convert scrgb to srgb.
|
|
9362
9451
|
* @param options Optional options.
|
|
9363
9452
|
* @return Output image.
|
|
9364
9453
|
*/
|
|
@@ -9647,13 +9736,13 @@ declare module Vips {
|
|
|
9647
9736
|
*/
|
|
9648
9737
|
linear?: boolean
|
|
9649
9738
|
/**
|
|
9650
|
-
* Fallback
|
|
9739
|
+
* Fallback input profile.
|
|
9651
9740
|
*/
|
|
9652
|
-
|
|
9741
|
+
input_profile?: string
|
|
9653
9742
|
/**
|
|
9654
|
-
* Fallback
|
|
9743
|
+
* Fallback output profile.
|
|
9655
9744
|
*/
|
|
9656
|
-
|
|
9745
|
+
output_profile?: string
|
|
9657
9746
|
/**
|
|
9658
9747
|
* Rendering intent.
|
|
9659
9748
|
*/
|