/usr/share/gtk-doc/html/libvips/libvips-conversion.html is in libvips-doc 7.26.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>conversion</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch02.html" title="VIPS operation API by section">
<link rel="prev" href="libvips-colour.html" title="colour">
<link rel="next" href="libvips-convolution.html" title="convolution">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libvips-colour.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">VIPS Reference Manual</th>
<td><a accesskey="n" href="libvips-convolution.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libvips-conversion.synopsis" class="shortcut">Top</a>
|
<a href="#libvips-conversion.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libvips-conversion"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-conversion.top_of_page"></a>conversion</span></h2>
<p>conversion — convert images in some way: change band format, change header, insert, extract, join</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-conversion.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="libvips-conversion.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <vips/vips.h>
<a class="link" href="libvips-mask.html#DOUBLEMASK:CAPS" title="DOUBLEMASK"><span class="returnvalue">DOUBLEMASK</span></a> * <a class="link" href="libvips-conversion.html#im-vips2mask" title="im_vips2mask ()">im_vips2mask</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-mask2vips" title="im_mask2vips ()">im_mask2vips</a> (<em class="parameter"><code><a class="link" href="libvips-mask.html#DOUBLEMASK:CAPS" title="DOUBLEMASK"><span class="type">DOUBLEMASK</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()">im_copy</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-set" title="im_copy_set ()">im_copy_set</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsInterpretation"><span class="type">VipsInterpretation</span></a> interpretation</code></em>,
<em class="parameter"><code><span class="type">float</span> xres</code></em>,
<em class="parameter"><code><span class="type">float</span> yres</code></em>,
<em class="parameter"><code><span class="type">int</span> xoffset</code></em>,
<em class="parameter"><code><span class="type">int</span> yoffset</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-set-meta" title="im_copy_set_meta ()">im_copy_set_meta</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *field</code></em>,
<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-morph" title="im_copy_morph ()">im_copy_morph</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> bands</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsBandFormat"><span class="type">VipsBandFormat</span></a> format</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsCoding"><span class="type">VipsCoding</span></a> coding</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-swap" title="im_copy_swap ()">im_copy_swap</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-native" title="im_copy_native ()">im_copy_native</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> is_msb_first</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-copy-file" title="im_copy_file ()">im_copy_file</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-clip2fmt" title="im_clip2fmt ()">im_clip2fmt</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsBandFormat"><span class="type">VipsBandFormat</span></a> fmt</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-scale" title="im_scale ()">im_scale</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-msb" title="im_msb ()">im_msb</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-msb-band" title="im_msb_band ()">im_msb_band</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-c2amph" title="im_c2amph ()">im_c2amph</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-c2rect" title="im_c2rect ()">im_c2rect</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-ri2c" title="im_ri2c ()">im_ri2c</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-c2imag" title="im_c2imag ()">im_c2imag</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-c2real" title="im_c2real ()">im_c2real</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-scaleps" title="im_scaleps ()">im_scaleps</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-falsecolour" title="im_falsecolour ()">im_falsecolour</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-gaussnoise" title="im_gaussnoise ()">im_gaussnoise</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">double</span> mean</code></em>,
<em class="parameter"><code><span class="type">double</span> sigma</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-black" title="im_black ()">im_black</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> bands</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-text" title="im_text ()">im_text</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *text</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *font</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> alignment</code></em>,
<em class="parameter"><code><span class="type">int</span> dpi</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-extract-band" title="im_extract_band ()">im_extract_band</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-extract-bands" title="im_extract_bands ()">im_extract_bands</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>,
<em class="parameter"><code><span class="type">int</span> nbands</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-extract-area" title="im_extract_area ()">im_extract_area</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> left</code></em>,
<em class="parameter"><code><span class="type">int</span> top</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-extract-areabands" title="im_extract_areabands ()">im_extract_areabands</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> left</code></em>,
<em class="parameter"><code><span class="type">int</span> top</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>,
<em class="parameter"><code><span class="type">int</span> nbands</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()">im_embed</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> type</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-bandjoin" title="im_bandjoin ()">im_bandjoin</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-gbandjoin" title="im_gbandjoin ()">im_gbandjoin</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> n</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()">im_insert</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-insert-noexpand" title="im_insert_noexpand ()">im_insert_noexpand</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-insertset" title="im_insertset ()">im_insertset</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> n</code></em>,
<em class="parameter"><code><span class="type">int</span> *x</code></em>,
<em class="parameter"><code><span class="type">int</span> *y</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-lrjoin" title="im_lrjoin ()">im_lrjoin</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *left</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *right</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-tbjoin" title="im_tbjoin ()">im_tbjoin</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *top</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *bottom</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-replicate" title="im_replicate ()">im_replicate</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> across</code></em>,
<em class="parameter"><code><span class="type">int</span> down</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-grid" title="im_grid ()">im_grid</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> tile_height</code></em>,
<em class="parameter"><code><span class="type">int</span> across</code></em>,
<em class="parameter"><code><span class="type">int</span> down</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-wrap" title="im_wrap ()">im_wrap</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-fliphor" title="im_fliphor ()">im_fliphor</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-flipver" title="im_flipver ()">im_flipver</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-rot90" title="im_rot90 ()">im_rot90</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-rot180" title="im_rot180 ()">im_rot180</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-rot270" title="im_rot270 ()">im_rot270</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-subsample" title="im_subsample ()">im_subsample</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> xshrink</code></em>,
<em class="parameter"><code><span class="type">int</span> yshrink</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-zoom" title="im_zoom ()">im_zoom</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> xfac</code></em>,
<em class="parameter"><code><span class="type">int</span> yfac</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libvips-conversion.html#im-system" title="im_system ()">im_system</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *im</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cmd</code></em>,
<em class="parameter"><code><span class="type">char</span> **out</code></em>);
<a class="link" href="VipsImage.html" title="VipsImage"><span class="returnvalue">VipsImage</span></a> * <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()">im_system_image</a> (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *im</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *in_format</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *out_format</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cmd_format</code></em>,
<em class="parameter"><code><span class="type">char</span> **log</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libvips-conversion.description"></a><h2>Description</h2>
<p>
These operations convert an image in some way. They can be split into a two
main groups.
</p>
<p>
The first set of operations change an image's format in some way. You
can change the band format (for example, cast to 32-bit unsigned
int), form complex images from real images, convert images to
matrices and back, change header fields, and a few others.
</p>
<p>
The second group move pixels about in some way. You can flip, rotate,
extract, insert and join pairs of images in various ways.
</p>
</div>
<div class="refsect1">
<a name="libvips-conversion.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="im-vips2mask"></a><h3>im_vips2mask ()</h3>
<pre class="programlisting"><a class="link" href="libvips-mask.html#DOUBLEMASK:CAPS" title="DOUBLEMASK"><span class="returnvalue">DOUBLEMASK</span></a> * im_vips2mask (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>);</pre>
<p>
Make a mask from an image. All images are cast to <code class="literal">IM_BANDFMT_DOUBLE</code>
before processing. There are two cases for handling bands:
</p>
<p>
If the image has a single band, <a class="link" href="libvips-conversion.html#im-vips2mask" title="im_vips2mask ()"><code class="function">im_vips2mask()</code></a> will write a mask the same
size as the image.
</p>
<p>
If the image has more than one band, it must be one pixel high or wide. In
this case the output mask uses that axis to represent band values.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-mask2vips" title="im_mask2vips ()"><code class="function">im_mask2vips()</code></a>, <a class="link" href="libvips-arithmetic.html#im-measure-area" title="im_measure_area ()"><code class="function">im_measure_area()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>name for output mask</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="libvips-mask.html#DOUBLEMASK:CAPS" title="DOUBLEMASK"><span class="type">DOUBLEMASK</span></a> with <em class="parameter"><code>outname</code></em> set as the name, or NULL on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-mask2vips"></a><h3>im_mask2vips ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_mask2vips (<em class="parameter"><code><a class="link" href="libvips-mask.html#DOUBLEMASK:CAPS" title="DOUBLEMASK"><span class="type">DOUBLEMASK</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Write a one-band, <code class="literal">IM_BANDFMT_DOUBLE</code> image to <em class="parameter"><code>out</code></em> based on mask <em class="parameter"><code>in</code></em>.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-vips2mask" title="im_vips2mask ()"><code class="function">im_vips2mask()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input mask</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy"></a><h3>im_copy ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Copy an image. VIPS copies images by copying pointers, so this operation is
fast, even for very large images.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>, <a class="link" href="libvips-conversion.html#im-copy-set" title="im_copy_set ()"><code class="function">im_copy_set()</code></a>, <a class="link" href="libvips-conversion.html#im-copy-morph" title="im_copy_morph ()"><code class="function">im_copy_morph()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-set"></a><h3>im_copy_set ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_set (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsInterpretation"><span class="type">VipsInterpretation</span></a> interpretation</code></em>,
<em class="parameter"><code><span class="type">float</span> xres</code></em>,
<em class="parameter"><code><span class="type">float</span> yres</code></em>,
<em class="parameter"><code><span class="type">int</span> xoffset</code></em>,
<em class="parameter"><code><span class="type">int</span> yoffset</code></em>);</pre>
<p>
Copy an image, changing informational header fields on the way.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>new VipsType to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xres</code></em> :</span></p></td>
<td>new Xres to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yres</code></em> :</span></p></td>
<td>new Yres to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xoffset</code></em> :</span></p></td>
<td>new Xoffset to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yoffset</code></em> :</span></p></td>
<td>new Yoffset to set</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-set-meta"></a><h3>im_copy_set_meta ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_set_meta (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *field</code></em>,
<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
<p>
Copy an image, changing a metadata field. You can use this to, for example,
update the ICC profile attached to an image.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>field</code></em> :</span></p></td>
<td>metadata field to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>value to set for the field</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-morph"></a><h3>im_copy_morph ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_morph (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> bands</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsBandFormat"><span class="type">VipsBandFormat</span></a> format</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsCoding"><span class="type">VipsCoding</span></a> coding</code></em>);</pre>
<p>
Copy an image, changing header fields which alter pixel addressing. The
pixel data itself is unchanged, this operation just changes the header
fields.
</p>
<p>
If you change the header fields such that the <code class="function">sizeof()</code> a pixel changes,
you'll get an error.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bands</code></em> :</span></p></td>
<td>new number of bands</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bandfmt</code></em> :</span></p></td>
<td>new band format</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coding</code></em> :</span></p></td>
<td>new coding</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-swap"></a><h3>im_copy_swap ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_swap (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Copy an image, swapping byte order between little and big endian. This
really does change image pixels and does not just alter the header.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>, <code class="function">im_amiMSBfirst()</code>, <code class="function">im_isMSBfirst()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-native"></a><h3>im_copy_native ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_native (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> is_msb_first</code></em>);</pre>
<p>
Copy an image to native order, that is, the order for the executing
program.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy-swap" title="im_copy_swap ()"><code class="function">im_copy_swap()</code></a>, <code class="function">im_amiMSBfirst()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_msb_first</code></em> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>in</code></em> is in most-significant first form</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-copy-file"></a><h3>im_copy_file ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_copy_file (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Copy an image to a disc file, then copy again to output. If the image is
already a disc file, just copy straight through.
</p>
<p>
The disc file is allocated in the same way as <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a>.
The file is automatically deleted when <em class="parameter"><code>out</code></em> is closed.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>, <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-clip2fmt"></a><h3>im_clip2fmt ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_clip2fmt (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html#VipsBandFormat"><span class="type">VipsBandFormat</span></a> fmt</code></em>);</pre>
<p>
Convert <em class="parameter"><code>in</code></em> to <em class="parameter"><code>fmt</code></em> format. You can convert between any pair of formats.
Floats are truncated (not rounded). Out of range values are clipped.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-scale" title="im_scale ()"><code class="function">im_scale()</code></a>, <a class="link" href="libvips-conversion.html#im-ri2c" title="im_ri2c ()"><code class="function">im_ri2c()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fmt</code></em> :</span></p></td>
<td>format to convert to</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-scale"></a><h3>im_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_scale (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Search the image for the maximum and minimum value, then return the image
as unsigned 8-bit, scaled so that the maximum value is 255 and the
minimum is zero.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-clip2fmt" title="im_clip2fmt ()"><code class="function">im_clip2fmt()</code></a>, <a class="link" href="libvips-conversion.html#im-scaleps" title="im_scaleps ()"><code class="function">im_scaleps()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-msb"></a><h3>im_msb ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_msb (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Turn any integer image to 8-bit unsigned char by discarding all but the most
significant byte.
Signed values are converted to unsigned by adding 128.
</p>
<p>
This operator also works for LABQ coding.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-msb-band" title="im_msb_band ()"><code class="function">im_msb_band()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-msb-band"></a><h3>im_msb_band ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_msb_band (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>);</pre>
<p>
Turn any integer image to a single-band 8-bit unsigned char by discarding
all but the most significant byte from the selected band.
Signed values are converted to unsigned by adding 128.
</p>
<p>
This operator also works for LABQ coding.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-msb-band" title="im_msb_band ()"><code class="function">im_msb_band()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td>
<td>select this band</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-c2amph"></a><h3>im_c2amph ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_c2amph (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Convert a complex image from rectangular to polar coordinates. Angles are
expressed in degrees.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-c2rect" title="im_c2rect ()"><code class="function">im_c2rect()</code></a>, <a class="link" href="libvips-arithmetic.html#im-abs" title="im_abs ()"><code class="function">im_abs()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-c2rect"></a><h3>im_c2rect ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_c2rect (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Convert a complex image from polar to rectangular coordinates. Angles are
expressed in degrees.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-c2amph" title="im_c2amph ()"><code class="function">im_c2amph()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-ri2c"></a><h3>im_ri2c ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_ri2c (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Compose two real images to make a complex image. If either <em class="parameter"><code>in1</code></em> or <em class="parameter"><code>in2</code></em> are
<code class="literal">IM_BANDFMT_DOUBLE</code>, <em class="parameter"><code>out</code></em> is <code class="literal">IM_BANDFMT_DPCOMPLEX</code>. Otherwise <em class="parameter"><code>out</code></em> is
<code class="literal">IM_BANDFMT_COMPLEX</code>. <em class="parameter"><code>in1</code></em> becomes the real component of <em class="parameter"><code>out</code></em> and <em class="parameter"><code>in2</code></em> the
imaginary.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-c2real" title="im_c2real ()"><code class="function">im_c2real()</code></a>, <a class="link" href="libvips-conversion.html#im-c2imag" title="im_c2imag ()"><code class="function">im_c2imag()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in1</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>in2</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-c2imag"></a><h3>im_c2imag ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_c2imag (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Extract the imaginary part of a complex image.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-c2real" title="im_c2real ()"><code class="function">im_c2real()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-c2real"></a><h3>im_c2real ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_c2real (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Extract the real part of a complex image.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-c2imag" title="im_c2imag ()"><code class="function">im_c2imag()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-scaleps"></a><h3>im_scaleps ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_scaleps (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Scale a power spectrum. Transform with log10(1.0 + pow(x, 0.25)) + .5,
then scale so max == 255.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-scale" title="im_scale ()"><code class="function">im_scale()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-falsecolour"></a><h3>im_falsecolour ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_falsecolour (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Force <em class="parameter"><code>in</code></em> to 1 band, 8-bit, then transform to
3-band 8-bit image with a false colour
map. The map is supposed to make small differences in brightness more
obvious.
</p>
<p>
See also: <a class="link" href="libvips-histograms-lut.html#im-maplut" title="im_maplut ()"><code class="function">im_maplut()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-gaussnoise"></a><h3>im_gaussnoise ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_gaussnoise (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">double</span> mean</code></em>,
<em class="parameter"><code><span class="type">double</span> sigma</code></em>);</pre>
<p>
Make a one band float image of gaussian noise with the specified
distribution. The noise distribution is created by averaging 12 random
numbers with the appropriate weights.
</p>
<p>
See also: <a class="link" href="libvips-convolution.html#im-addgnoise" title="im_addgnoise ()"><code class="function">im_addgnoise()</code></a>, <a class="link" href="libvips-other.html#im-make-xy" title="im_make_xy ()"><code class="function">im_make_xy()</code></a>, <a class="link" href="libvips-conversion.html#im-text" title="im_text ()"><code class="function">im_text()</code></a>, <a class="link" href="libvips-conversion.html#im-black" title="im_black ()"><code class="function">im_black()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>output width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>output height</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mean</code></em> :</span></p></td>
<td>average value in output</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sigma</code></em> :</span></p></td>
<td>standard deviation in output</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-black"></a><h3>im_black ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_black (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> bands</code></em>);</pre>
<p>
Make a black unsigned char image of a specified size.
</p>
<p>
See also: <a class="link" href="libvips-other.html#im-make-xy" title="im_make_xy ()"><code class="function">im_make_xy()</code></a>, <a class="link" href="libvips-conversion.html#im-text" title="im_text ()"><code class="function">im_text()</code></a>, <a class="link" href="libvips-conversion.html#im-gaussnoise" title="im_gaussnoise ()"><code class="function">im_gaussnoise()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output <span class="type">IMAGE</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>output width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>output height</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bands</code></em> :</span></p></td>
<td>number of output bands</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-text"></a><h3>im_text ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_text (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *text</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *font</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> alignment</code></em>,
<em class="parameter"><code><span class="type">int</span> dpi</code></em>);</pre>
<p>
Draw the string <em class="parameter"><code>text</code></em> to an image. <em class="parameter"><code>out</code></em> is a one-band 8-bit
unsigned char image, with 0 for no text and 255 for text. Values inbetween
are used for anti-aliasing.
</p>
<p>
<em class="parameter"><code>text</code></em> is the text to render as a UTF-8 string. It can contain Pango markup,
for example "<i>The</i>Guardian".
</p>
<p>
<em class="parameter"><code>font</code></em> is the font to render with, selected by fontconfig. Examples might be
"sans 12" or perhaps "bitstream charter bold 10".
</p>
<p>
<em class="parameter"><code>width</code></em> is the maximum number of pixels across to draw within. If the
generated text is wider than this, it will wrap to a new line. In this
case, <em class="parameter"><code>alignment</code></em> can be used to set the alignment style for multi-line
text. 0 means left-align, 1 centre, 2 right-align.
</p>
<p>
<em class="parameter"><code>dpi</code></em> sets the resolution to render at. "sans 12" at 72 dpi draws characters
approximately 12 pixels high.
</p>
<p>
See also: <a class="link" href="libvips-other.html#im-make-xy" title="im_make_xy ()"><code class="function">im_make_xy()</code></a>, <a class="link" href="libvips-conversion.html#im-black" title="im_black ()"><code class="function">im_black()</code></a>, <a class="link" href="libvips-conversion.html#im-gaussnoise" title="im_gaussnoise ()"><code class="function">im_gaussnoise()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>utf-8 text string to render</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
<td>font to render with</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>render within this many pixels across</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>alignment</code></em> :</span></p></td>
<td>left/centre/right alignment</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dpi</code></em> :</span></p></td>
<td>render at this resolution</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-extract-band"></a><h3>im_extract_band ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_extract_band (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>);</pre>
<p>
Extract a single band from an image.
Extracting outside <em class="parameter"><code>in</code></em> will trigger an error.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-bandjoin" title="im_bandjoin ()"><code class="function">im_bandjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td>
<td>band to extract</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-extract-bands"></a><h3>im_extract_bands ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_extract_bands (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>,
<em class="parameter"><code><span class="type">int</span> nbands</code></em>);</pre>
<p>
Extract a number of bands from an image.
Extracting outside <em class="parameter"><code>in</code></em> will trigger an error.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-bandjoin" title="im_bandjoin ()"><code class="function">im_bandjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td>
<td>first band to extract</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nbands</code></em> :</span></p></td>
<td>number of bands to extract</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-extract-area"></a><h3>im_extract_area ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_extract_area (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> left</code></em>,
<em class="parameter"><code><span class="type">int</span> top</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
<p>
Extract an area from an image.
Extracting outside <em class="parameter"><code>in</code></em> will trigger an error.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()"><code class="function">im_embed()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-extract-bands" title="im_extract_bands ()"><code class="function">im_extract_bands()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>left edge of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>top edge of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>width of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>height of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-extract-areabands"></a><h3>im_extract_areabands ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_extract_areabands (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> left</code></em>,
<em class="parameter"><code><span class="type">int</span> top</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>,
<em class="parameter"><code><span class="type">int</span> band</code></em>,
<em class="parameter"><code><span class="type">int</span> nbands</code></em>);</pre>
<p>
Extract an area and a number of bands from an image. Bands number from
zero. Extracting outside <em class="parameter"><code>in</code></em> will trigger an error.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()"><code class="function">im_embed()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-extract-area" title="im_extract_area ()"><code class="function">im_extract_area()</code></a>, <a class="link" href="libvips-conversion.html#im-extract-bands" title="im_extract_bands ()"><code class="function">im_extract_bands()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>left edge of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>top edge rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>width of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>height of rectangle</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>band</code></em> :</span></p></td>
<td>first band to extract</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nbands</code></em> :</span></p></td>
<td>number of bands to extract</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-embed"></a><h3>im_embed ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_embed (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> type</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
<p>
The opposite of <code class="function">im_extract()</code>: embed an image within a larger image. <em class="parameter"><code>type</code></em>
controls what appears in the new pels:
</p>
<p>
</p>
<table border="1">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left">0</td>
<td align="left">black pels (all bytes == 0)</td>
</tr>
<tr>
<td align="left">1</td>
<td align="left">extend pels from image edge</td>
</tr>
<tr>
<td align="left">2</td>
<td align="left">repeat image</td>
</tr>
<tr>
<td align="left">3</td>
<td align="left">mirror image</td>
</tr>
<tr>
<td align="left">4</td>
<td align="left">white pels (all bytes == 255)</td>
</tr>
</tbody>
</table>
<p>
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-extract-area" title="im_extract_area ()"><code class="function">im_extract_area()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>how to generate the edge pixels</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>place <em class="parameter"><code>in</code></em> at this x position in <em class="parameter"><code>out</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>place <em class="parameter"><code>in</code></em> at this y position in <em class="parameter"><code>out</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>
<em class="parameter"><code>out</code></em> should be this many pixels across</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>
<em class="parameter"><code>out</code></em> should be this many pixels down</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-bandjoin"></a><h3>im_bandjoin ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_bandjoin (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in1</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in2</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Join two images bandwise.
If the two images
have n and m bands respectively, then the output image will have n + m
bands, with the first n coming from the first image and the last m
from the second.
</p>
<p>
If the images differ in size, the smaller image is enlarged to match the
larger by adding zero pixels along the bottom and right.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-gbandjoin" title="im_gbandjoin ()"><code class="function">im_gbandjoin()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in1</code></em> :</span></p></td>
<td>first input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>in2</code></em> :</span></p></td>
<td>second input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-gbandjoin"></a><h3>im_gbandjoin ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_gbandjoin (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> n</code></em>);</pre>
<p>
Join a set of images together, bandwise.
If the images
have n and m bands, then the output image will have n + m
bands, with the first n coming from the first image and the last m
from the second.
</p>
<p>
If the images differ in size, the smaller images are enlarged to match the
larger by adding zero pixels along the bottom and right.
</p>
<p>
The input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-bandjoin" title="im_bandjoin ()"><code class="function">im_bandjoin()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>vector of input images</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>number of input images</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-insert"></a><h3>im_insert ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_insert (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>
Insert one image into another. <em class="parameter"><code>sub</code></em> is inserted into image <em class="parameter"><code>main</code></em> at
position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> relative to the top LH corner of <em class="parameter"><code>main</code></em>. <em class="parameter"><code>out</code></em> is made large
enough to hold both <em class="parameter"><code>main</code></em> and <em class="parameter"><code>sub</code></em>. Any areas of <em class="parameter"><code>out</code></em> not coming from
either <em class="parameter"><code>main</code></em> or <em class="parameter"><code>sub</code></em> are set to black (binary 0). If <em class="parameter"><code>sub</code></em> overlaps <em class="parameter"><code>main</code></em>,
<em class="parameter"><code>sub</code></em> will appear on top of <em class="parameter"><code>main</code></em>.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-insert-noexpand" title="im_insert_noexpand ()"><code class="function">im_insert_noexpand()</code></a>, <a class="link" href="libvips-conversion.html#im-lrjoin" title="im_lrjoin ()"><code class="function">im_lrjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>main</code></em> :</span></p></td>
<td>big image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub</code></em> :</span></p></td>
<td>small image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>left position of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>top position of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-insert-noexpand"></a><h3>im_insert_noexpand ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_insert_noexpand (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>
Insert one image into another. <em class="parameter"><code>sub</code></em> is inserted into image <em class="parameter"><code>main</code></em> at
position <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> relative to the top LH corner of <em class="parameter"><code>main</code></em>. <em class="parameter"><code>out</code></em> is the same
size as <em class="parameter"><code>main</code></em>. <em class="parameter"><code>sub</code></em> is clipped against the edges of <em class="parameter"><code>main</code></em>.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-insert-noexpand" title="im_insert_noexpand ()"><code class="function">im_insert_noexpand()</code></a>, <a class="link" href="libvips-conversion.html#im-lrjoin" title="im_lrjoin ()"><code class="function">im_lrjoin()</code></a>, <a class="link" href="libvips-inplace.html#im-draw-image" title="im_draw_image ()"><code class="function">im_draw_image()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>main</code></em> :</span></p></td>
<td>big image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub</code></em> :</span></p></td>
<td>small image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>left position of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>top position of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-insertset"></a><h3>im_insertset ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_insertset (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *main</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *sub</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> n</code></em>,
<em class="parameter"><code><span class="type">int</span> *x</code></em>,
<em class="parameter"><code><span class="type">int</span> *y</code></em>);</pre>
<p>
Insert <em class="parameter"><code>sub</code></em> repeatedly into <em class="parameter"><code>main</code></em> at the positions listed in the arrays <em class="parameter"><code>x</code></em>,
<em class="parameter"><code>y</code></em> of length <em class="parameter"><code>n</code></em>. <em class="parameter"><code>out</code></em> is the same
size as <em class="parameter"><code>main</code></em>. <em class="parameter"><code>sub</code></em> is clipped against the edges of <em class="parameter"><code>main</code></em>.
</p>
<p>
This operation is fast for large <em class="parameter"><code>n</code></em>, but will use a memory buffer the size
of <em class="parameter"><code>out</code></em>. It's useful for things like making scatter plots.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-lrjoin" title="im_lrjoin ()"><code class="function">im_lrjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>main</code></em> :</span></p></td>
<td>big image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sub</code></em> :</span></p></td>
<td>small image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>number of positions</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>left positions of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>top positions of <em class="parameter"><code>sub</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-lrjoin"></a><h3>im_lrjoin ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_lrjoin (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *left</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *right</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Join <em class="parameter"><code>left</code></em> and <em class="parameter"><code>right</code></em> together, left-right. If one is taller than the
other, <em class="parameter"><code>out</code></em> will be has high as the smaller.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-tbjoin" title="im_tbjoin ()"><code class="function">im_tbjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>left</code></em> :</span></p></td>
<td>image to go on left</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>right</code></em> :</span></p></td>
<td>image to go on right</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-tbjoin"></a><h3>im_tbjoin ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_tbjoin (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *top</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *bottom</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Join <em class="parameter"><code>top</code></em> and <em class="parameter"><code>bottom</code></em> together, up-down. If one is wider than the
other, <em class="parameter"><code>out</code></em> will be has wide as the smaller.
</p>
<p>
If the number of bands differs, one of the images
must have one band. In this case, an n-band image is formed from the
one-band image by joining n copies of the one-band image together, and then
the two n-band images are operated upon.
</p>
<p>
The two input images are cast up to the smallest common type (see table
Smallest common format in
arithmetic).
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-tbjoin" title="im_tbjoin ()"><code class="function">im_tbjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
<td>image to go on top</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bottom</code></em> :</span></p></td>
<td>image to go on bottom</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-replicate"></a><h3>im_replicate ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_replicate (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> across</code></em>,
<em class="parameter"><code><span class="type">int</span> down</code></em>);</pre>
<p>
Replicate an image x times horizontally and vertically.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()"><code class="function">im_embed()</code></a>, <a class="link" href="libvips-conversion.html#im-copy" title="im_copy ()"><code class="function">im_copy()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>across</code></em> :</span></p></td>
<td>repeat <em class="parameter"><code>in</code></em> this many times across</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>down</code></em> :</span></p></td>
<td>repeat <em class="parameter"><code>in</code></em> this many times down</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-grid"></a><h3>im_grid ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_grid (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> tile_height</code></em>,
<em class="parameter"><code><span class="type">int</span> across</code></em>,
<em class="parameter"><code><span class="type">int</span> down</code></em>);</pre>
<p>
Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.
</p>
<p>
The input image should be a very tall, thin image containing a list of
smaller images. Volumetric or time-sequence images are often laid out like
this. This image is chopped into a series of tiles, each <em class="parameter"><code>tile_height</code></em>
pixels high and the width of <em class="parameter"><code>in</code></em>. The tiles are then rearranged into a grid
<em class="parameter"><code>across</code></em> tiles across and <em class="parameter"><code>down</code></em> tiles down in row-major order.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()"><code class="function">im_embed()</code></a>, <a class="link" href="libvips-conversion.html#im-insert" title="im_insert ()"><code class="function">im_insert()</code></a>, <a class="link" href="libvips-conversion.html#im-lrjoin" title="im_lrjoin ()"><code class="function">im_lrjoin()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tile_height</code></em> :</span></p></td>
<td>chop into tiles this high</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>across</code></em> :</span></p></td>
<td>tiles across</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>down</code></em> :</span></p></td>
<td>tiles down</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-wrap"></a><h3>im_wrap ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_wrap (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> x</code></em>,
<em class="parameter"><code><span class="type">int</span> y</code></em>);</pre>
<p>
Slice an image up and move the segments about so that the pixel that was
at 0, 0 is now at <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-embed" title="im_embed ()"><code class="function">im_embed()</code></a>, <a class="link" href="libvips-conversion.html#im-replicate" title="im_replicate ()"><code class="function">im_replicate()</code></a>, <a class="link" href="libvips-freq-filt.html#im-rotquad" title="im_rotquad ()"><code class="function">im_rotquad()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>horizontal displacement</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>vertical displacement</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-fliphor"></a><h3>im_fliphor ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_fliphor (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Flips an image left-right.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-flipver" title="im_flipver ()"><code class="function">im_flipver()</code></a>, <a class="link" href="libvips-conversion.html#im-rot90" title="im_rot90 ()"><code class="function">im_rot90()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-flipver"></a><h3>im_flipver ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_flipver (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Flips an image top-bottom.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-fliphor" title="im_fliphor ()"><code class="function">im_fliphor()</code></a>, <a class="link" href="libvips-conversion.html#im-rot90" title="im_rot90 ()"><code class="function">im_rot90()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-rot90"></a><h3>im_rot90 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_rot90 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Rotate an image 90 degrees.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-rot180" title="im_rot180 ()"><code class="function">im_rot180()</code></a>, <a class="link" href="libvips-conversion.html#im-rot270" title="im_rot270 ()"><code class="function">im_rot270()</code></a>, <a class="link" href="libvips-resample.html#im-affinei-all" title="im_affinei_all ()"><code class="function">im_affinei_all()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-rot180"></a><h3>im_rot180 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_rot180 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Rotate an image 180 degrees.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-rot90" title="im_rot90 ()"><code class="function">im_rot90()</code></a>, <a class="link" href="libvips-conversion.html#im-rot270" title="im_rot270 ()"><code class="function">im_rot270()</code></a>, <a class="link" href="libvips-resample.html#im-affinei-all" title="im_affinei_all ()"><code class="function">im_affinei_all()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-rot270"></a><h3>im_rot270 ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_rot270 (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>);</pre>
<p>
Rotate an image 270 degrees.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-rot180" title="im_rot180 ()"><code class="function">im_rot180()</code></a>, <a class="link" href="libvips-conversion.html#im-rot90" title="im_rot90 ()"><code class="function">im_rot90()</code></a>, <a class="link" href="libvips-resample.html#im-affinei-all" title="im_affinei_all ()"><code class="function">im_affinei_all()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-subsample"></a><h3>im_subsample ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_subsample (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> xshrink</code></em>,
<em class="parameter"><code><span class="type">int</span> yshrink</code></em>);</pre>
<p>
Subsample an image by an integer fraction. This is fast nearest-neighbour
shrink.
</p>
<p>
See also: <a class="link" href="libvips-resample.html#im-shrink" title="im_shrink ()"><code class="function">im_shrink()</code></a>, <a class="link" href="libvips-resample.html#im-affinei" title="im_affinei ()"><code class="function">im_affinei()</code></a>, <a class="link" href="libvips-conversion.html#im-zoom" title="im_zoom ()"><code class="function">im_zoom()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xshrink</code></em> :</span></p></td>
<td>horizontal shrink factor</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yshrink</code></em> :</span></p></td>
<td>vertical shrink factor</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-zoom"></a><h3>im_zoom ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_zoom (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *out</code></em>,
<em class="parameter"><code><span class="type">int</span> xfac</code></em>,
<em class="parameter"><code><span class="type">int</span> yfac</code></em>);</pre>
<p>
Zoom an image by repeating pixels. This is fast nearest-neighbour
zoom.
</p>
<p>
See also: <a class="link" href="libvips-resample.html#im-affinei" title="im_affinei ()"><code class="function">im_affinei()</code></a>, <a class="link" href="libvips-conversion.html#im-subsample" title="im_subsample ()"><code class="function">im_subsample()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
<td>input image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>output image</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xfac</code></em> :</span></p></td>
<td>horizontal scale factor</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>yfac</code></em> :</span></p></td>
<td>vertical scale factor</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-system"></a><h3>im_system ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> im_system (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *im</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cmd</code></em>,
<em class="parameter"><code><span class="type">char</span> **out</code></em>);</pre>
<p>
<a class="link" href="libvips-conversion.html#im-system" title="im_system ()"><code class="function">im_system()</code></a> runs a command on an image, returning the command's output as a
string. The command is executed with <code class="function">popen()</code>, the first '%<code class="literal">s</code>' in the
command being substituted for a filename.
</p>
<p>
If the IMAGE is a file on disc, then the filename will be the name of the
real file. If the image is in memory, or the result of a computation,
then a new file is created in the temporary area called something like
"vips_XXXXXX.v", and that filename given to the command. The file is
deleted when the command finishes.
</p>
<p>
See <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a> for details on how VIPS selects a temporary
directory.
</p>
<p>
In all cases, <em class="parameter"><code>log</code></em> must be freed with <code class="function">im_free()</code>.
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>im</code></em> :</span></p></td>
<td>image to run command on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmd</code></em> :</span></p></td>
<td>command to run</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
<td>stdout of command is returned here</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>0 on success, -1 on error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="im-system-image"></a><h3>im_system_image ()</h3>
<pre class="programlisting"><a class="link" href="VipsImage.html" title="VipsImage"><span class="returnvalue">VipsImage</span></a> * im_system_image (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *im</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *in_format</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *out_format</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *cmd_format</code></em>,
<em class="parameter"><code><span class="type">char</span> **log</code></em>);</pre>
<p>
<a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a> runs a command, passing an image in and getting an image
back. The command's stdout is returned in <em class="parameter"><code>log</code></em>.
</p>
<p>
First, <em class="parameter"><code>im</code></em> is written to a file. The filename is formed by substituting
something like "vips-49857-1" for the first %<code class="literal">s</code> in <em class="parameter"><code>in_format</code></em>, then
prepending "/tmp". If the environment variable TMPDIR is defined, it
can be used to set a different temporary directory. If <em class="parameter"><code>in_format</code></em> is
something like "%<code class="literal">s</code>.png", the file will be written in PNG format.
</p>
<p>
On Windows, if the environment variable TMPDIR is not defined, VIPS calls
<code class="function">GetTempPath()</code> to get the user's preferred temporary area. If that fails, it
defaults to C:\temp.
</p>
<p>
Next an output filename is created in the same way using <em class="parameter"><code>out_format</code></em>. The
command string to run is made by substituting the first %<code class="literal">s</code> in <em class="parameter"><code>cmd_format</code></em>
for the name of the input file and the second %<code class="literal">s</code> for the output filename.
</p>
<p>
The command is executed with <code class="function">popen()</code> and the output captured in <em class="parameter"><code>log</code></em>. If
the command fails, the temporary files are deleted and <a class="link" href="libvips-conversion.html#im-system-image" title="im_system_image ()"><code class="function">im_system_image()</code></a>
returns NULL. <em class="parameter"><code>log</code></em> is still set.
</p>
<p>
If the command succeeds, the input file is deleted, the output file opened,
and returned. Closing the output image will automatically delete the file.
</p>
<p>
In all cases, <em class="parameter"><code>log</code></em> must be freed with <code class="function">im_free()</code>.
</p>
<p>
For example, this call will run the ImageMagick convert program on an
image, using JPEG files to pass images into and out of the convert command.
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
im_system_image( in, out,
"%s.jpg", "%s.jpg", "convert %s -swirl 45 %s",
&log )
</pre></div>
<p>
</p>
<p>
See also: <a class="link" href="libvips-conversion.html#im-system" title="im_system ()"><code class="function">im_system()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>im</code></em> :</span></p></td>
<td>image to run command on</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>in_format</code></em> :</span></p></td>
<td>write input file like this</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>out_format</code></em> :</span></p></td>
<td>write output filename like this</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cmd_format</code></em> :</span></p></td>
<td>command to run</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>log</code></em> :</span></p></td>
<td>stdout of command is returned here</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an image on success, NULL on error</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="libvips-conversion.see-also"></a><h2>See Also</h2>
<a class="link" href="libvips-resample.html" title="resample">resample</a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.17</div>
</body>
</html>
|