wasm-vips 0.0.8 → 0.0.10

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/lib/vips.d.ts CHANGED
@@ -142,8 +142,9 @@ declare module Vips {
142
142
 
143
143
  /**
144
144
  * Signal that a C++ object is no longer needed and can be deleted later.
145
+ * @return `this`.
145
146
  */
146
- deleteLater(): void;
147
+ deleteLater(): T;
147
148
 
148
149
  /**
149
150
  * Check whether two Embind handles point to the same underlying object.
@@ -157,6 +158,12 @@ declare module Vips {
157
158
  * @return `true` if this handle is deleted.
158
159
  */
159
160
  isDeleted(): boolean;
161
+
162
+ /**
163
+ * Prevents the C++ object from being auto deleted.
164
+ * @return `this`.
165
+ */
166
+ preventAutoDelete(): T;
160
167
  }
161
168
 
162
169
  /**
@@ -506,6 +513,11 @@ declare module Vips {
506
513
  */
507
514
  readonly filename: string;
508
515
 
516
+ /**
517
+ * Page height in pixels.
518
+ */
519
+ readonly pageHeight: number;
520
+
509
521
  /**
510
522
  * Block evaluation on this image.
511
523
  */
@@ -964,7 +976,7 @@ declare module Vips {
964
976
  * @param name The name of the piece of metadata to remove.
965
977
  * @return `true` if successfully removed.
966
978
  */
967
- remove(name: string): string;
979
+ remove(name: string): boolean;
968
980
 
969
981
  //#endregion
970
982
 
@@ -1490,43 +1502,43 @@ declare module Vips {
1490
1502
  /**
1491
1503
  * Unsigned char format
1492
1504
  */
1493
- uchar = 'uchar',
1505
+ uchar = 0, // 'uchar'
1494
1506
  /**
1495
1507
  * Char format
1496
1508
  */
1497
- char = 'char',
1509
+ char = 1, // 'char'
1498
1510
  /**
1499
1511
  * Unsigned short format
1500
1512
  */
1501
- ushort = 'ushort',
1513
+ ushort = 2, // 'ushort'
1502
1514
  /**
1503
1515
  * Short format
1504
1516
  */
1505
- short = 'short',
1517
+ short = 3, // 'short'
1506
1518
  /**
1507
1519
  * Unsigned int format
1508
1520
  */
1509
- uint = 'uint',
1521
+ uint = 4, // 'uint'
1510
1522
  /**
1511
1523
  * Int format
1512
1524
  */
1513
- int = 'int',
1525
+ int = 5, // 'int'
1514
1526
  /**
1515
1527
  * Float format
1516
1528
  */
1517
- float = 'float',
1529
+ float = 6, // 'float'
1518
1530
  /**
1519
1531
  * Complex (two floats) format
1520
1532
  */
1521
- complex = 'complex',
1533
+ complex = 7, // 'complex'
1522
1534
  /**
1523
1535
  * Double float format
1524
1536
  */
1525
- double = 'double',
1537
+ double = 8, // 'double'
1526
1538
  /**
1527
1539
  * Double complex (two double) format
1528
1540
  */
1529
- dpcomplex = 'dpcomplex'
1541
+ dpcomplex = 9 // 'dpcomplex'
1530
1542
  }
1531
1543
 
1532
1544
  /**
@@ -1543,103 +1555,103 @@ declare module Vips {
1543
1555
  /**
1544
1556
  * Where the second object is drawn, the first is removed
1545
1557
  */
1546
- clear = 'clear',
1558
+ clear = 0, // 'clear'
1547
1559
  /**
1548
1560
  * The second object is drawn as if nothing were below
1549
1561
  */
1550
- source = 'source',
1562
+ source = 1, // 'source'
1551
1563
  /**
1552
1564
  * The image shows what you would expect if you held two semi-transparent slides on top of each other
1553
1565
  */
1554
- over = 'over',
1566
+ over = 2, // 'over'
1555
1567
  /**
1556
1568
  * The first object is removed completely, the second is only drawn where the first was
1557
1569
  */
1558
- in = 'in',
1570
+ in = 3, // 'in'
1559
1571
  /**
1560
1572
  * The second is drawn only where the first isn't
1561
1573
  */
1562
- out = 'out',
1574
+ out = 4, // 'out'
1563
1575
  /**
1564
1576
  * This leaves the first object mostly intact, but mixes both objects in the overlapping area
1565
1577
  */
1566
- atop = 'atop',
1578
+ atop = 5, // 'atop'
1567
1579
  /**
1568
1580
  * Leaves the first object untouched, the second is discarded completely
1569
1581
  */
1570
- dest = 'dest',
1582
+ dest = 6, // 'dest'
1571
1583
  /**
1572
1584
  * Like OVER, but swaps the arguments
1573
1585
  */
1574
- dest_over = 'dest-over',
1586
+ dest_over = 7, // 'dest-over'
1575
1587
  /**
1576
1588
  * Like IN, but swaps the arguments
1577
1589
  */
1578
- dest_in = 'dest-in',
1590
+ dest_in = 8, // 'dest-in'
1579
1591
  /**
1580
1592
  * Like OUT, but swaps the arguments
1581
1593
  */
1582
- dest_out = 'dest-out',
1594
+ dest_out = 9, // 'dest-out'
1583
1595
  /**
1584
1596
  * Like ATOP, but swaps the arguments
1585
1597
  */
1586
- dest_atop = 'dest-atop',
1598
+ dest_atop = 10, // 'dest-atop'
1587
1599
  /**
1588
1600
  * Something like a difference operator
1589
1601
  */
1590
- xor = 'xor',
1602
+ xor = 11, // 'xor'
1591
1603
  /**
1592
1604
  * A bit like adding the two images
1593
1605
  */
1594
- add = 'add',
1606
+ add = 12, // 'add'
1595
1607
  /**
1596
1608
  * A bit like the darker of the two
1597
1609
  */
1598
- saturate = 'saturate',
1610
+ saturate = 13, // 'saturate'
1599
1611
  /**
1600
1612
  * At least as dark as the darker of the two inputs
1601
1613
  */
1602
- multiply = 'multiply',
1614
+ multiply = 14, // 'multiply'
1603
1615
  /**
1604
1616
  * At least as light as the lighter of the inputs
1605
1617
  */
1606
- screen = 'screen',
1618
+ screen = 15, // 'screen'
1607
1619
  /**
1608
1620
  * Multiplies or screens colors, depending on the lightness
1609
1621
  */
1610
- overlay = 'overlay',
1622
+ overlay = 16, // 'overlay'
1611
1623
  /**
1612
1624
  * The darker of each component
1613
1625
  */
1614
- darken = 'darken',
1626
+ darken = 17, // 'darken'
1615
1627
  /**
1616
1628
  * The lighter of each component
1617
1629
  */
1618
- lighten = 'lighten',
1630
+ lighten = 18, // 'lighten'
1619
1631
  /**
1620
1632
  * Brighten first by a factor second
1621
1633
  */
1622
- colour_dodge = 'colour-dodge',
1634
+ colour_dodge = 19, // 'colour-dodge'
1623
1635
  /**
1624
1636
  * Darken first by a factor of second
1625
1637
  */
1626
- colour_burn = 'colour-burn',
1638
+ colour_burn = 20, // 'colour-burn'
1627
1639
  /**
1628
1640
  * Multiply or screen, depending on lightness
1629
1641
  */
1630
- hard_light = 'hard-light',
1642
+ hard_light = 21, // 'hard-light'
1631
1643
  /**
1632
1644
  * Darken or lighten, depending on lightness
1633
1645
  */
1634
- soft_light = 'soft-light',
1646
+ soft_light = 22, // 'soft-light'
1635
1647
  /**
1636
1648
  * Difference of the two
1637
1649
  */
1638
- difference = 'difference',
1650
+ difference = 23, // 'difference'
1639
1651
  /**
1640
1652
  * Somewhat like DIFFERENCE, but lower-contrast
1641
1653
  */
1642
- exclusion = 'exclusion'
1654
+ exclusion = 24 // 'exclusion'
1643
1655
  }
1644
1656
 
1645
1657
  /**
@@ -1656,15 +1668,15 @@ declare module Vips {
1656
1668
  /**
1657
1669
  * Pixels are not coded
1658
1670
  */
1659
- none = 'none',
1671
+ none = 0, // 'none'
1660
1672
  /**
1661
1673
  * Pixels encode 3 float CIELAB values as 4 uchar
1662
1674
  */
1663
- labq = 'labq',
1675
+ labq = 2, // 'labq'
1664
1676
  /**
1665
1677
  * Pixels encode 3 float RGB as 4 uchar (Radiance coding)
1666
1678
  */
1667
- rad = 'rad'
1679
+ rad = 6 // 'rad'
1668
1680
  }
1669
1681
 
1670
1682
  /**
@@ -1682,79 +1694,79 @@ declare module Vips {
1682
1694
  /**
1683
1695
  * Generic many-band image
1684
1696
  */
1685
- multiband = 'multiband',
1697
+ multiband = 0, // 'multiband'
1686
1698
  /**
1687
1699
  * Some kind of single-band image
1688
1700
  */
1689
- b_w = 'b-w',
1701
+ b_w = 1, // 'b-w'
1690
1702
  /**
1691
1703
  * A 1D image, eg. histogram or lookup table
1692
1704
  */
1693
- histogram = 'histogram',
1705
+ histogram = 10, // 'histogram'
1694
1706
  /**
1695
1707
  * The first three bands are CIE XYZ
1696
1708
  */
1697
- xyz = 'xyz',
1709
+ xyz = 12, // 'xyz'
1698
1710
  /**
1699
1711
  * Pixels are in CIE Lab space
1700
1712
  */
1701
- lab = 'lab',
1713
+ lab = 13, // 'lab'
1702
1714
  /**
1703
1715
  * The first four bands are in CMYK space
1704
1716
  */
1705
- cmyk = 'cmyk',
1717
+ cmyk = 15, // 'cmyk'
1706
1718
  /**
1707
1719
  * Implies #VIPS_CODING_LABQ
1708
1720
  */
1709
- labq = 'labq',
1721
+ labq = 16, // 'labq'
1710
1722
  /**
1711
1723
  * Generic RGB space
1712
1724
  */
1713
- rgb = 'rgb',
1725
+ rgb = 17, // 'rgb'
1714
1726
  /**
1715
1727
  * A uniform colourspace based on CMC(1:1)
1716
1728
  */
1717
- cmc = 'cmc',
1729
+ cmc = 18, // 'cmc'
1718
1730
  /**
1719
1731
  * Pixels are in CIE LCh space
1720
1732
  */
1721
- lch = 'lch',
1733
+ lch = 19, // 'lch'
1722
1734
  /**
1723
1735
  * CIE LAB coded as three signed 16-bit values
1724
1736
  */
1725
- labs = 'labs',
1737
+ labs = 21, // 'labs'
1726
1738
  /**
1727
1739
  * Pixels are sRGB
1728
1740
  */
1729
- srgb = 'srgb',
1741
+ srgb = 22, // 'srgb'
1730
1742
  /**
1731
1743
  * Pixels are CIE Yxy
1732
1744
  */
1733
- yxy = 'yxy',
1745
+ yxy = 23, // 'yxy'
1734
1746
  /**
1735
1747
  * Image is in fourier space
1736
1748
  */
1737
- fourier = 'fourier',
1749
+ fourier = 24, // 'fourier'
1738
1750
  /**
1739
1751
  * Generic 16-bit RGB
1740
1752
  */
1741
- rgb16 = 'rgb16',
1753
+ rgb16 = 25, // 'rgb16'
1742
1754
  /**
1743
1755
  * Generic 16-bit mono
1744
1756
  */
1745
- grey16 = 'grey16',
1757
+ grey16 = 26, // 'grey16'
1746
1758
  /**
1747
1759
  * A matrix
1748
1760
  */
1749
- matrix = 'matrix',
1761
+ matrix = 27, // 'matrix'
1750
1762
  /**
1751
1763
  * Pixels are scRGB
1752
1764
  */
1753
- scrgb = 'scrgb',
1765
+ scrgb = 28, // 'scrgb'
1754
1766
  /**
1755
1767
  * Pixels are HSV
1756
1768
  */
1757
- hsv = 'hsv'
1769
+ hsv = 29 // 'hsv'
1758
1770
  }
1759
1771
 
1760
1772
  /**
@@ -1791,15 +1803,15 @@ declare module Vips {
1791
1803
  /**
1792
1804
  * Demand in small (typically 128x128 pixel) tiles
1793
1805
  */
1794
- smalltile = 'smalltile',
1806
+ smalltile = 0, // 'smalltile'
1795
1807
  /**
1796
1808
  * Demand in fat (typically 16 pixel high) strips
1797
1809
  */
1798
- fatstrip = 'fatstrip',
1810
+ fatstrip = 1, // 'fatstrip'
1799
1811
  /**
1800
1812
  * Demand in thin (typically 1 pixel high) strips
1801
1813
  */
1802
- thinstrip = 'thinstrip'
1814
+ thinstrip = 2 // 'thinstrip'
1803
1815
  }
1804
1816
 
1805
1817
  /**
@@ -1809,27 +1821,27 @@ declare module Vips {
1809
1821
  /**
1810
1822
  * ==
1811
1823
  */
1812
- equal = 'equal',
1824
+ equal = 0, // 'equal'
1813
1825
  /**
1814
1826
  * !=
1815
1827
  */
1816
- noteq = 'noteq',
1828
+ noteq = 1, // 'noteq'
1817
1829
  /**
1818
1830
  * <
1819
1831
  */
1820
- less = 'less',
1832
+ less = 2, // 'less'
1821
1833
  /**
1822
1834
  * <=
1823
1835
  */
1824
- lesseq = 'lesseq',
1836
+ lesseq = 3, // 'lesseq'
1825
1837
  /**
1826
1838
  * >
1827
1839
  */
1828
- more = 'more',
1840
+ more = 4, // 'more'
1829
1841
  /**
1830
1842
  * >=
1831
1843
  */
1832
- moreeq = 'moreeq'
1844
+ moreeq = 5 // 'moreeq'
1833
1845
  }
1834
1846
 
1835
1847
  /**
@@ -1839,23 +1851,23 @@ declare module Vips {
1839
1851
  /**
1840
1852
  * &
1841
1853
  */
1842
- and = 'and',
1854
+ and = 0, // 'and'
1843
1855
  /**
1844
1856
  * |
1845
1857
  */
1846
- or = 'or',
1858
+ or = 1, // 'or'
1847
1859
  /**
1848
1860
  * ^
1849
1861
  */
1850
- eor = 'eor',
1862
+ eor = 2, // 'eor'
1851
1863
  /**
1852
1864
  * >>
1853
1865
  */
1854
- lshift = 'lshift',
1866
+ lshift = 3, // 'lshift'
1855
1867
  /**
1856
1868
  * <<
1857
1869
  */
1858
- rshift = 'rshift'
1870
+ rshift = 4 // 'rshift'
1859
1871
  }
1860
1872
 
1861
1873
  /**
@@ -1865,15 +1877,15 @@ declare module Vips {
1865
1877
  /**
1866
1878
  * Pow(left, right)
1867
1879
  */
1868
- pow = 'pow',
1880
+ pow = 0, // 'pow'
1869
1881
  /**
1870
1882
  * Pow(right, left)
1871
1883
  */
1872
- wop = 'wop',
1884
+ wop = 1, // 'wop'
1873
1885
  /**
1874
1886
  * Atan2(left, right)
1875
1887
  */
1876
- atan2 = 'atan2'
1888
+ atan2 = 2 // 'atan2'
1877
1889
  }
1878
1890
 
1879
1891
  /**
@@ -1883,7 +1895,7 @@ declare module Vips {
1883
1895
  /**
1884
1896
  * Convert to polar coordinates
1885
1897
  */
1886
- cross_phase = 'cross-phase'
1898
+ cross_phase = 0 // 'cross-phase'
1887
1899
  }
1888
1900
 
1889
1901
  /**
@@ -1893,67 +1905,67 @@ declare module Vips {
1893
1905
  /**
1894
1906
  * Sin(), angles in degrees
1895
1907
  */
1896
- sin = 'sin',
1908
+ sin = 0, // 'sin'
1897
1909
  /**
1898
1910
  * Cos(), angles in degrees
1899
1911
  */
1900
- cos = 'cos',
1912
+ cos = 1, // 'cos'
1901
1913
  /**
1902
1914
  * Tan(), angles in degrees
1903
1915
  */
1904
- tan = 'tan',
1916
+ tan = 2, // 'tan'
1905
1917
  /**
1906
1918
  * Asin(), angles in degrees
1907
1919
  */
1908
- asin = 'asin',
1920
+ asin = 3, // 'asin'
1909
1921
  /**
1910
1922
  * Acos(), angles in degrees
1911
1923
  */
1912
- acos = 'acos',
1924
+ acos = 4, // 'acos'
1913
1925
  /**
1914
1926
  * Atan(), angles in degrees
1915
1927
  */
1916
- atan = 'atan',
1928
+ atan = 5, // 'atan'
1917
1929
  /**
1918
1930
  * Log base e
1919
1931
  */
1920
- log = 'log',
1932
+ log = 6, // 'log'
1921
1933
  /**
1922
1934
  * Log base 10
1923
1935
  */
1924
- log10 = 'log10',
1936
+ log10 = 7, // 'log10'
1925
1937
  /**
1926
1938
  * E to the something
1927
1939
  */
1928
- exp = 'exp',
1940
+ exp = 8, // 'exp'
1929
1941
  /**
1930
1942
  * 10 to the something
1931
1943
  */
1932
- exp10 = 'exp10',
1944
+ exp10 = 9, // 'exp10'
1933
1945
  /**
1934
1946
  * Sinh(), angles in radians
1935
1947
  */
1936
- sinh = 'sinh',
1948
+ sinh = 10, // 'sinh'
1937
1949
  /**
1938
1950
  * Cosh(), angles in radians
1939
1951
  */
1940
- cosh = 'cosh',
1952
+ cosh = 11, // 'cosh'
1941
1953
  /**
1942
1954
  * Tanh(), angles in radians
1943
1955
  */
1944
- tanh = 'tanh',
1956
+ tanh = 12, // 'tanh'
1945
1957
  /**
1946
1958
  * Asinh(), angles in radians
1947
1959
  */
1948
- asinh = 'asinh',
1960
+ asinh = 13, // 'asinh'
1949
1961
  /**
1950
1962
  * Acosh(), angles in radians
1951
1963
  */
1952
- acosh = 'acosh',
1964
+ acosh = 14, // 'acosh'
1953
1965
  /**
1954
1966
  * Atanh(), angles in radians
1955
1967
  */
1956
- atanh = 'atanh'
1968
+ atanh = 15 // 'atanh'
1957
1969
  }
1958
1970
 
1959
1971
  /**
@@ -1963,15 +1975,15 @@ declare module Vips {
1963
1975
  /**
1964
1976
  * Round to nearest
1965
1977
  */
1966
- rint = 'rint',
1978
+ rint = 0, // 'rint'
1967
1979
  /**
1968
1980
  * The smallest integral value not less than
1969
1981
  */
1970
- ceil = 'ceil',
1982
+ ceil = 1, // 'ceil'
1971
1983
  /**
1972
1984
  * Largest integral value not greater than
1973
1985
  */
1974
- floor = 'floor'
1986
+ floor = 2 // 'floor'
1975
1987
  }
1976
1988
 
1977
1989
  /**
@@ -1981,15 +1993,15 @@ declare module Vips {
1981
1993
  /**
1982
1994
  * Convert to polar coordinates
1983
1995
  */
1984
- polar = 'polar',
1996
+ polar = 0, // 'polar'
1985
1997
  /**
1986
1998
  * Convert to rectangular coordinates
1987
1999
  */
1988
- rect = 'rect',
2000
+ rect = 1, // 'rect'
1989
2001
  /**
1990
2002
  * Complex conjugate
1991
2003
  */
1992
- conj = 'conj'
2004
+ conj = 2 // 'conj'
1993
2005
  }
1994
2006
 
1995
2007
  /**
@@ -1999,11 +2011,11 @@ declare module Vips {
1999
2011
  /**
2000
2012
  * Get real component
2001
2013
  */
2002
- real = 'real',
2014
+ real = 0, // 'real'
2003
2015
  /**
2004
2016
  * Get imaginary component
2005
2017
  */
2006
- imag = 'imag'
2018
+ imag = 1 // 'imag'
2007
2019
  }
2008
2020
 
2009
2021
  /**
@@ -2013,15 +2025,15 @@ declare module Vips {
2013
2025
  /**
2014
2026
  * Take the maximum of the possible values
2015
2027
  */
2016
- max = 'max',
2028
+ max = 0, // 'max'
2017
2029
  /**
2018
2030
  * Sum all the values
2019
2031
  */
2020
- sum = 'sum',
2032
+ sum = 1, // 'sum'
2021
2033
  /**
2022
2034
  * Take the minimum value
2023
2035
  */
2024
- min = 'min'
2036
+ min = 2 // 'min'
2025
2037
  }
2026
2038
 
2027
2039
  /**
@@ -2037,12 +2049,12 @@ declare module Vips {
2037
2049
  /**
2038
2050
  * Can read anywhere
2039
2051
  */
2040
- random = 'random',
2052
+ random = 0, // 'random'
2041
2053
  /**
2042
2054
  * Top-to-bottom reading only, but with a small buffer
2043
2055
  */
2044
- sequential = 'sequential',
2045
- sequential_unbuffered = 'sequential-unbuffered'
2056
+ sequential = 1, // 'sequential'
2057
+ sequential_unbuffered = 2 // 'sequential-unbuffered'
2046
2058
  }
2047
2059
 
2048
2060
  /**
@@ -2074,27 +2086,27 @@ declare module Vips {
2074
2086
  /**
2075
2087
  * Extend with black (all 0) pixels
2076
2088
  */
2077
- black = 'black',
2089
+ black = 0, // 'black'
2078
2090
  /**
2079
2091
  * Copy the image edges
2080
2092
  */
2081
- copy = 'copy',
2093
+ copy = 1, // 'copy'
2082
2094
  /**
2083
2095
  * Repeat the whole image
2084
2096
  */
2085
- repeat = 'repeat',
2097
+ repeat = 2, // 'repeat'
2086
2098
  /**
2087
2099
  * Mirror the whole image
2088
2100
  */
2089
- mirror = 'mirror',
2101
+ mirror = 3, // 'mirror'
2090
2102
  /**
2091
2103
  * Extend with white (all bits set) pixels
2092
2104
  */
2093
- white = 'white',
2105
+ white = 4, // 'white'
2094
2106
  /**
2095
2107
  * Extend with colour from the @background property
2096
2108
  */
2097
- background = 'background'
2109
+ background = 5 // 'background'
2098
2110
  }
2099
2111
 
2100
2112
  /**
@@ -2104,39 +2116,39 @@ declare module Vips {
2104
2116
  /**
2105
2117
  * Centre
2106
2118
  */
2107
- centre = 'centre',
2119
+ centre = 0, // 'centre'
2108
2120
  /**
2109
2121
  * North
2110
2122
  */
2111
- north = 'north',
2123
+ north = 1, // 'north'
2112
2124
  /**
2113
2125
  * East
2114
2126
  */
2115
- east = 'east',
2127
+ east = 2, // 'east'
2116
2128
  /**
2117
2129
  * South
2118
2130
  */
2119
- south = 'south',
2131
+ south = 3, // 'south'
2120
2132
  /**
2121
2133
  * West
2122
2134
  */
2123
- west = 'west',
2135
+ west = 4, // 'west'
2124
2136
  /**
2125
2137
  * North-east
2126
2138
  */
2127
- north_east = 'north-east',
2139
+ north_east = 5, // 'north-east'
2128
2140
  /**
2129
2141
  * South-east
2130
2142
  */
2131
- south_east = 'south-east',
2143
+ south_east = 6, // 'south-east'
2132
2144
  /**
2133
2145
  * South-west
2134
2146
  */
2135
- south_west = 'south-west',
2147
+ south_west = 7, // 'south-west'
2136
2148
  /**
2137
2149
  * North-west
2138
2150
  */
2139
- north_west = 'north-west'
2151
+ north_west = 8 // 'north-west'
2140
2152
  }
2141
2153
 
2142
2154
  /**
@@ -2151,11 +2163,11 @@ declare module Vips {
2151
2163
  /**
2152
2164
  * Left-right
2153
2165
  */
2154
- horizontal = 'horizontal',
2166
+ horizontal = 0, // 'horizontal'
2155
2167
  /**
2156
2168
  * Top-bottom
2157
2169
  */
2158
- vertical = 'vertical'
2170
+ vertical = 1 // 'vertical'
2159
2171
  }
2160
2172
 
2161
2173
  /**
@@ -2170,15 +2182,15 @@ declare module Vips {
2170
2182
  /**
2171
2183
  * Align low coordinate edge
2172
2184
  */
2173
- low = 'low',
2185
+ low = 0, // 'low'
2174
2186
  /**
2175
2187
  * Align centre
2176
2188
  */
2177
- centre = 'centre',
2189
+ centre = 1, // 'centre'
2178
2190
  /**
2179
2191
  * Align high coordinate edge
2180
2192
  */
2181
- high = 'high'
2193
+ high = 2 // 'high'
2182
2194
  }
2183
2195
 
2184
2196
  /**
@@ -2196,31 +2208,31 @@ declare module Vips {
2196
2208
  /**
2197
2209
  * Do nothing
2198
2210
  */
2199
- none = 'none',
2211
+ none = 0, // 'none'
2200
2212
  /**
2201
2213
  * Just take the centre
2202
2214
  */
2203
- centre = 'centre',
2215
+ centre = 1, // 'centre'
2204
2216
  /**
2205
2217
  * Use an entropy measure
2206
2218
  */
2207
- entropy = 'entropy',
2219
+ entropy = 2, // 'entropy'
2208
2220
  /**
2209
2221
  * Look for features likely to draw human attention
2210
2222
  */
2211
- attention = 'attention',
2223
+ attention = 3, // 'attention'
2212
2224
  /**
2213
2225
  * Position the crop towards the low coordinate
2214
2226
  */
2215
- low = 'low',
2227
+ low = 4, // 'low'
2216
2228
  /**
2217
2229
  * Position the crop towards the high coordinate
2218
2230
  */
2219
- high = 'high',
2231
+ high = 5, // 'high'
2220
2232
  /**
2221
2233
  * Everything is interesting
2222
2234
  */
2223
- all = 'all'
2235
+ all = 6 // 'all'
2224
2236
  }
2225
2237
 
2226
2238
  /**
@@ -2234,19 +2246,19 @@ declare module Vips {
2234
2246
  /**
2235
2247
  * No rotate
2236
2248
  */
2237
- d0 = 'd0',
2249
+ d0 = 0, // 'd0'
2238
2250
  /**
2239
2251
  * 90 degrees clockwise
2240
2252
  */
2241
- d90 = 'd90',
2253
+ d90 = 1, // 'd90'
2242
2254
  /**
2243
2255
  * 180 degree rotate
2244
2256
  */
2245
- d180 = 'd180',
2257
+ d180 = 2, // 'd180'
2246
2258
  /**
2247
2259
  * 90 degrees anti-clockwise
2248
2260
  */
2249
- d270 = 'd270'
2261
+ d270 = 3 // 'd270'
2250
2262
  }
2251
2263
 
2252
2264
  /**
@@ -2260,35 +2272,35 @@ declare module Vips {
2260
2272
  /**
2261
2273
  * No rotate
2262
2274
  */
2263
- d0 = 'd0',
2275
+ d0 = 0, // 'd0'
2264
2276
  /**
2265
2277
  * 45 degrees clockwise
2266
2278
  */
2267
- d45 = 'd45',
2279
+ d45 = 1, // 'd45'
2268
2280
  /**
2269
2281
  * 90 degrees clockwise
2270
2282
  */
2271
- d90 = 'd90',
2283
+ d90 = 2, // 'd90'
2272
2284
  /**
2273
2285
  * 135 degrees clockwise
2274
2286
  */
2275
- d135 = 'd135',
2287
+ d135 = 3, // 'd135'
2276
2288
  /**
2277
2289
  * 180 degrees
2278
2290
  */
2279
- d180 = 'd180',
2291
+ d180 = 4, // 'd180'
2280
2292
  /**
2281
2293
  * 135 degrees anti-clockwise
2282
2294
  */
2283
- d225 = 'd225',
2295
+ d225 = 5, // 'd225'
2284
2296
  /**
2285
2297
  * 90 degrees anti-clockwise
2286
2298
  */
2287
- d270 = 'd270',
2299
+ d270 = 6, // 'd270'
2288
2300
  /**
2289
2301
  * 45 degrees anti-clockwise
2290
2302
  */
2291
- d315 = 'd315'
2303
+ d315 = 7 // 'd315'
2292
2304
  }
2293
2305
 
2294
2306
  /**
@@ -2298,15 +2310,15 @@ declare module Vips {
2298
2310
  /**
2299
2311
  * Int everywhere
2300
2312
  */
2301
- integer = 'integer',
2313
+ integer = 0, // 'integer'
2302
2314
  /**
2303
2315
  * Float everywhere
2304
2316
  */
2305
- float = 'float',
2317
+ float = 1, // 'float'
2306
2318
  /**
2307
2319
  * Approximate integer output
2308
2320
  */
2309
- approximate = 'approximate'
2321
+ approximate = 2 // 'approximate'
2310
2322
  }
2311
2323
 
2312
2324
  /**
@@ -2319,19 +2331,19 @@ declare module Vips {
2319
2331
  /**
2320
2332
  * Wrap at word boundaries
2321
2333
  */
2322
- word = 'word',
2334
+ word = 0, // 'word'
2323
2335
  /**
2324
2336
  * Wrap at character boundaries
2325
2337
  */
2326
- char = 'char',
2338
+ char = 1, // 'char'
2327
2339
  /**
2328
2340
  * Wrap at word boundaries, but fall back to character boundaries if there is not enough space for a full word
2329
2341
  */
2330
- word_char = 'word-char',
2342
+ word_char = 2, // 'word-char'
2331
2343
  /**
2332
2344
  * No wrapping
2333
2345
  */
2334
- none = 'none'
2346
+ none = 3 // 'none'
2335
2347
  }
2336
2348
 
2337
2349
  /**
@@ -2345,19 +2357,19 @@ declare module Vips {
2345
2357
  /**
2346
2358
  * Never stop
2347
2359
  */
2348
- none = 'none',
2360
+ none = 0, // 'none'
2349
2361
  /**
2350
2362
  * Stop on image truncated, nothing else
2351
2363
  */
2352
- truncated = 'truncated',
2364
+ truncated = 1, // 'truncated'
2353
2365
  /**
2354
2366
  * Stop on serious error or truncation
2355
2367
  */
2356
- error = 'error',
2368
+ error = 2, // 'error'
2357
2369
  /**
2358
2370
  * Stop on anything, even warnings
2359
2371
  */
2360
- warning = 'warning'
2372
+ warning = 3 // 'warning'
2361
2373
  }
2362
2374
 
2363
2375
  /**
@@ -2378,23 +2390,23 @@ declare module Vips {
2378
2390
  /**
2379
2391
  * Portable bitmap
2380
2392
  */
2381
- pbm = 'pbm',
2393
+ pbm = 0, // 'pbm'
2382
2394
  /**
2383
2395
  * Portable greymap
2384
2396
  */
2385
- pgm = 'pgm',
2397
+ pgm = 1, // 'pgm'
2386
2398
  /**
2387
2399
  * Portable pixmap
2388
2400
  */
2389
- ppm = 'ppm',
2401
+ ppm = 2, // 'ppm'
2390
2402
  /**
2391
2403
  * Portable float map
2392
2404
  */
2393
- pfm = 'pfm',
2405
+ pfm = 3, // 'pfm'
2394
2406
  /**
2395
2407
  * Portable anymap
2396
2408
  */
2397
- pnm = 'pnm'
2409
+ pnm = 4 // 'pnm'
2398
2410
  }
2399
2411
 
2400
2412
  /**
@@ -2404,15 +2416,15 @@ declare module Vips {
2404
2416
  /**
2405
2417
  * Prevent subsampling when quality >= 90
2406
2418
  */
2407
- auto = 'auto',
2419
+ auto = 0, // 'auto'
2408
2420
  /**
2409
2421
  * Always perform subsampling
2410
2422
  */
2411
- on = 'on',
2423
+ on = 1, // 'on'
2412
2424
  /**
2413
2425
  * Never perform subsampling
2414
2426
  */
2415
- off = 'off'
2427
+ off = 2 // 'off'
2416
2428
  }
2417
2429
 
2418
2430
  /**
@@ -2422,23 +2434,23 @@ declare module Vips {
2422
2434
  /**
2423
2435
  * Use DeepZoom directory layout
2424
2436
  */
2425
- dz = 'dz',
2437
+ dz = 0, // 'dz'
2426
2438
  /**
2427
2439
  * Use Zoomify directory layout
2428
2440
  */
2429
- zoomify = 'zoomify',
2441
+ zoomify = 1, // 'zoomify'
2430
2442
  /**
2431
2443
  * Use Google maps directory layout
2432
2444
  */
2433
- google = 'google',
2445
+ google = 2, // 'google'
2434
2446
  /**
2435
2447
  * Use IIIF v2 directory layout
2436
2448
  */
2437
- iiif = 'iiif',
2449
+ iiif = 3, // 'iiif'
2438
2450
  /**
2439
2451
  * Use IIIF v3 directory layout
2440
2452
  */
2441
- iiif3 = 'iiif3'
2453
+ iiif3 = 4 // 'iiif3'
2442
2454
  }
2443
2455
 
2444
2456
  /**
@@ -2448,15 +2460,15 @@ declare module Vips {
2448
2460
  /**
2449
2461
  * Create layers down to 1x1 pixel
2450
2462
  */
2451
- onepixel = 'onepixel',
2463
+ onepixel = 0, // 'onepixel'
2452
2464
  /**
2453
2465
  * Create layers down to 1x1 tile
2454
2466
  */
2455
- onetile = 'onetile',
2467
+ onetile = 1, // 'onetile'
2456
2468
  /**
2457
2469
  * Only create a single layer
2458
2470
  */
2459
- one = 'one'
2471
+ one = 2 // 'one'
2460
2472
  }
2461
2473
 
2462
2474
  /**
@@ -2466,15 +2478,15 @@ declare module Vips {
2466
2478
  /**
2467
2479
  * Write tiles to the filesystem
2468
2480
  */
2469
- fs = 'fs',
2481
+ fs = 0, // 'fs'
2470
2482
  /**
2471
2483
  * Write tiles to a zip file
2472
2484
  */
2473
- zip = 'zip',
2485
+ zip = 1, // 'zip'
2474
2486
  /**
2475
2487
  * Write to a szi file
2476
2488
  */
2477
- szi = 'szi'
2489
+ szi = 2 // 'szi'
2478
2490
  }
2479
2491
 
2480
2492
  /**
@@ -2484,27 +2496,27 @@ declare module Vips {
2484
2496
  /**
2485
2497
  * Use the average
2486
2498
  */
2487
- mean = 'mean',
2499
+ mean = 0, // 'mean'
2488
2500
  /**
2489
2501
  * Use the median
2490
2502
  */
2491
- median = 'median',
2503
+ median = 1, // 'median'
2492
2504
  /**
2493
2505
  * Use the mode
2494
2506
  */
2495
- mode = 'mode',
2507
+ mode = 2, // 'mode'
2496
2508
  /**
2497
2509
  * Use the maximum
2498
2510
  */
2499
- max = 'max',
2511
+ max = 3, // 'max'
2500
2512
  /**
2501
2513
  * Use the minimum
2502
2514
  */
2503
- min = 'min',
2515
+ min = 4, // 'min'
2504
2516
  /**
2505
2517
  * Use the top-left pixel
2506
2518
  */
2507
- nearest = 'nearest'
2519
+ nearest = 5 // 'nearest'
2508
2520
  }
2509
2521
 
2510
2522
  /**
@@ -2514,27 +2526,27 @@ declare module Vips {
2514
2526
  /**
2515
2527
  * Default preset
2516
2528
  */
2517
- default = 'default',
2529
+ default = 0, // 'default'
2518
2530
  /**
2519
2531
  * Digital picture, like portrait, inner shot
2520
2532
  */
2521
- picture = 'picture',
2533
+ picture = 1, // 'picture'
2522
2534
  /**
2523
2535
  * Outdoor photograph, with natural lighting
2524
2536
  */
2525
- photo = 'photo',
2537
+ photo = 2, // 'photo'
2526
2538
  /**
2527
2539
  * Hand or line drawing, with high-contrast details
2528
2540
  */
2529
- drawing = 'drawing',
2541
+ drawing = 3, // 'drawing'
2530
2542
  /**
2531
2543
  * Small-sized colorful images
2532
2544
  */
2533
- icon = 'icon',
2545
+ icon = 4, // 'icon'
2534
2546
  /**
2535
2547
  * Text-like
2536
2548
  */
2537
- text = 'text'
2549
+ text = 5 // 'text'
2538
2550
  }
2539
2551
 
2540
2552
  /**
@@ -2552,39 +2564,39 @@ declare module Vips {
2552
2564
  /**
2553
2565
  * No compression
2554
2566
  */
2555
- none = 'none',
2567
+ none = 0, // 'none'
2556
2568
  /**
2557
2569
  * Jpeg compression
2558
2570
  */
2559
- jpeg = 'jpeg',
2571
+ jpeg = 1, // 'jpeg'
2560
2572
  /**
2561
2573
  * Deflate (zip) compression
2562
2574
  */
2563
- deflate = 'deflate',
2575
+ deflate = 2, // 'deflate'
2564
2576
  /**
2565
2577
  * Packbits compression
2566
2578
  */
2567
- packbits = 'packbits',
2579
+ packbits = 3, // 'packbits'
2568
2580
  /**
2569
2581
  * Fax4 compression
2570
2582
  */
2571
- ccittfax4 = 'ccittfax4',
2583
+ ccittfax4 = 4, // 'ccittfax4'
2572
2584
  /**
2573
2585
  * LZW compression
2574
2586
  */
2575
- lzw = 'lzw',
2587
+ lzw = 5, // 'lzw'
2576
2588
  /**
2577
2589
  * WEBP compression
2578
2590
  */
2579
- webp = 'webp',
2591
+ webp = 6, // 'webp'
2580
2592
  /**
2581
2593
  * ZSTD compression
2582
2594
  */
2583
- zstd = 'zstd',
2595
+ zstd = 7, // 'zstd'
2584
2596
  /**
2585
2597
  * JP2K compression
2586
2598
  */
2587
- jp2k = 'jp2k'
2599
+ jp2k = 8 // 'jp2k'
2588
2600
  }
2589
2601
 
2590
2602
  /**
@@ -2595,15 +2607,15 @@ declare module Vips {
2595
2607
  /**
2596
2608
  * No prediction
2597
2609
  */
2598
- none = 'none',
2610
+ none = 1, // 'none'
2599
2611
  /**
2600
2612
  * Horizontal differencing
2601
2613
  */
2602
- horizontal = 'horizontal',
2614
+ horizontal = 2, // 'horizontal'
2603
2615
  /**
2604
2616
  * Float predictor
2605
2617
  */
2606
- float = 'float'
2618
+ float = 3 // 'float'
2607
2619
  }
2608
2620
 
2609
2621
  /**
@@ -2613,11 +2625,11 @@ declare module Vips {
2613
2625
  /**
2614
2626
  * Use centimeters
2615
2627
  */
2616
- cm = 'cm',
2628
+ cm = 0, // 'cm'
2617
2629
  /**
2618
2630
  * Use inches
2619
2631
  */
2620
- inch = 'inch'
2632
+ inch = 1 // 'inch'
2621
2633
  }
2622
2634
 
2623
2635
  /**
@@ -2629,19 +2641,19 @@ declare module Vips {
2629
2641
  /**
2630
2642
  * X265
2631
2643
  */
2632
- hevc = 'hevc',
2644
+ hevc = 1, // 'hevc'
2633
2645
  /**
2634
2646
  * X264
2635
2647
  */
2636
- avc = 'avc',
2648
+ avc = 2, // 'avc'
2637
2649
  /**
2638
2650
  * Jpeg
2639
2651
  */
2640
- jpeg = 'jpeg',
2652
+ jpeg = 3, // 'jpeg'
2641
2653
  /**
2642
2654
  * Aom
2643
2655
  */
2644
- av1 = 'av1'
2656
+ av1 = 4 // 'av1'
2645
2657
  }
2646
2658
 
2647
2659
  /**
@@ -2653,23 +2665,23 @@ declare module Vips {
2653
2665
  /**
2654
2666
  * Auto
2655
2667
  */
2656
- auto = 'auto',
2668
+ auto = 0, // 'auto'
2657
2669
  /**
2658
2670
  * Aom
2659
2671
  */
2660
- aom = 'aom',
2672
+ aom = 1, // 'aom'
2661
2673
  /**
2662
2674
  * RAV1E
2663
2675
  */
2664
- rav1e = 'rav1e',
2676
+ rav1e = 2, // 'rav1e'
2665
2677
  /**
2666
2678
  * SVT-AV1
2667
2679
  */
2668
- svt = 'svt',
2680
+ svt = 3, // 'svt'
2669
2681
  /**
2670
2682
  * X265
2671
2683
  */
2672
- x265 = 'x265'
2684
+ x265 = 4 // 'x265'
2673
2685
  }
2674
2686
 
2675
2687
  /**
@@ -2682,19 +2694,19 @@ declare module Vips {
2682
2694
  /**
2683
2695
  * Size both up and down
2684
2696
  */
2685
- both = 'both',
2697
+ both = 0, // 'both'
2686
2698
  /**
2687
2699
  * Only upsize
2688
2700
  */
2689
- up = 'up',
2701
+ up = 1, // 'up'
2690
2702
  /**
2691
2703
  * Only downsize
2692
2704
  */
2693
- down = 'down',
2705
+ down = 2, // 'down'
2694
2706
  /**
2695
2707
  * Force size, that is, break aspect ratio
2696
2708
  */
2697
- force = 'force'
2709
+ force = 3 // 'force'
2698
2710
  }
2699
2711
 
2700
2712
  /**
@@ -2706,19 +2718,19 @@ declare module Vips {
2706
2718
  /**
2707
2719
  * Perceptual rendering intent
2708
2720
  */
2709
- perceptual = 'perceptual',
2721
+ perceptual = 0, // 'perceptual'
2710
2722
  /**
2711
2723
  * Relative colorimetric rendering intent
2712
2724
  */
2713
- relative = 'relative',
2725
+ relative = 1, // 'relative'
2714
2726
  /**
2715
2727
  * Saturation rendering intent
2716
2728
  */
2717
- saturation = 'saturation',
2729
+ saturation = 2, // 'saturation'
2718
2730
  /**
2719
2731
  * Absolute colorimetric rendering intent
2720
2732
  */
2721
- absolute = 'absolute'
2733
+ absolute = 3 // 'absolute'
2722
2734
  }
2723
2735
 
2724
2736
  /**
@@ -2728,27 +2740,27 @@ declare module Vips {
2728
2740
  /**
2729
2741
  * The nearest pixel to the point.
2730
2742
  */
2731
- nearest = 'nearest',
2743
+ nearest = 0, // 'nearest'
2732
2744
  /**
2733
2745
  * Convolve with a triangle filter.
2734
2746
  */
2735
- linear = 'linear',
2747
+ linear = 1, // 'linear'
2736
2748
  /**
2737
2749
  * Convolve with a cubic filter.
2738
2750
  */
2739
- cubic = 'cubic',
2751
+ cubic = 2, // 'cubic'
2740
2752
  /**
2741
2753
  * Convolve with a Mitchell kernel.
2742
2754
  */
2743
- mitchell = 'mitchell',
2755
+ mitchell = 3, // 'mitchell'
2744
2756
  /**
2745
2757
  * Convolve with a two-lobe Lanczos kernel.
2746
2758
  */
2747
- lanczos2 = 'lanczos2',
2759
+ lanczos2 = 4, // 'lanczos2'
2748
2760
  /**
2749
2761
  * Convolve with a three-lobe Lanczos kernel.
2750
2762
  */
2751
- lanczos3 = 'lanczos3'
2763
+ lanczos3 = 5 // 'lanczos3'
2752
2764
  }
2753
2765
 
2754
2766
  /**
@@ -2760,11 +2772,11 @@ declare module Vips {
2760
2772
  /**
2761
2773
  * Use CIELAB D65 as the Profile Connection Space
2762
2774
  */
2763
- lab = 'lab',
2775
+ lab = 0, // 'lab'
2764
2776
  /**
2765
2777
  * Use XYZ as the Profile Connection Space
2766
2778
  */
2767
- xyz = 'xyz'
2779
+ xyz = 1 // 'xyz'
2768
2780
  }
2769
2781
 
2770
2782
  /**
@@ -2776,11 +2788,11 @@ declare module Vips {
2776
2788
  /**
2777
2789
  * True if all set
2778
2790
  */
2779
- erode = 'erode',
2791
+ erode = 0, // 'erode'
2780
2792
  /**
2781
2793
  * True if one set
2782
2794
  */
2783
- dilate = 'dilate'
2795
+ dilate = 1 // 'dilate'
2784
2796
  }
2785
2797
 
2786
2798
  /**
@@ -2795,11 +2807,11 @@ declare module Vips {
2795
2807
  /**
2796
2808
  * Set pixels to the new value
2797
2809
  */
2798
- set = 'set',
2810
+ set = 0, // 'set'
2799
2811
  /**
2800
2812
  * Add pixels
2801
2813
  */
2802
- add = 'add'
2814
+ add = 1 // 'add'
2803
2815
  }
2804
2816
 
2805
2817
  /**
@@ -2809,31 +2821,31 @@ declare module Vips {
2809
2821
  /**
2810
2822
  * Don't attach metadata
2811
2823
  */
2812
- none = 'none',
2824
+ none = 0, // 'none'
2813
2825
  /**
2814
2826
  * Keep Exif metadata
2815
2827
  */
2816
- exif = 'exif',
2828
+ exif = 1, // 'exif'
2817
2829
  /**
2818
2830
  * Keep XMP metadata
2819
2831
  */
2820
- xmp = 'xmp',
2832
+ xmp = 2, // 'xmp'
2821
2833
  /**
2822
2834
  * Keep IPTC metadata
2823
2835
  */
2824
- iptc = 'iptc',
2836
+ iptc = 4, // 'iptc'
2825
2837
  /**
2826
2838
  * Keep ICC metadata
2827
2839
  */
2828
- icc = 'icc',
2840
+ icc = 8, // 'icc'
2829
2841
  /**
2830
2842
  * Keep other metadata (e.g. PNG comments and some TIFF tags)
2831
2843
  */
2832
- other = 'other',
2844
+ other = 16, // 'other'
2833
2845
  /**
2834
2846
  * Keep all metadata
2835
2847
  */
2836
- all = 'all'
2848
+ all = 31 // 'all'
2837
2849
  }
2838
2850
 
2839
2851
  /**
@@ -2844,27 +2856,27 @@ declare module Vips {
2844
2856
  /**
2845
2857
  * No filtering
2846
2858
  */
2847
- none = 'none',
2859
+ none = 8, // 'none'
2848
2860
  /**
2849
2861
  * Difference to the left
2850
2862
  */
2851
- sub = 'sub',
2863
+ sub = 16, // 'sub'
2852
2864
  /**
2853
2865
  * Difference up
2854
2866
  */
2855
- up = 'up',
2867
+ up = 32, // 'up'
2856
2868
  /**
2857
2869
  * Average of left and up
2858
2870
  */
2859
- avg = 'avg',
2871
+ avg = 64, // 'avg'
2860
2872
  /**
2861
2873
  * Pick best neighbor predictor automatically
2862
2874
  */
2863
- paeth = 'paeth',
2875
+ paeth = 128, // 'paeth'
2864
2876
  /**
2865
2877
  * Adaptive
2866
2878
  */
2867
- all = 'all'
2879
+ all = 248 // 'all'
2868
2880
  }
2869
2881
 
2870
2882
  //#endregion