@@ -53,17 +53,64 @@ I used 7.0.11 and configured with:
53
53
54
54
```
55
55
$ ./configure --prefix=/home/john/vips --enable-debug --enable-maintainer-zts \
56
- --enable-cgi --enable-cli --with-readline --with-openssl --with-zlib \
57
- --with-gd --with-jpeg-dir=/usr
56
+ --enable-cgi --enable-cli --with-readline --with-openssl --with-zlib \
57
+ --with-gd --with-jpeg-dir=/usr
58
58
```
59
59
60
- You'll need libvips 8.0 or later, including all the headers for development.
61
- On linux, install with your package manager.
62
- On OS X, install with ` brew ` or MacPorts. For Windows, download a zip from
63
- the libvips
64
- website, or build your own.
60
+ You'll need libvips 8.0 or later, including all the headers for
61
+ development. On linux, install with your package manager. On OS X,
62
+ install with ` brew ` or MacPorts. For Windows, download a zip from the
63
+ libvips website, or build your own.
65
64
66
- ### Regenerate build system
65
+ ### Installing
66
+
67
+ ```
68
+ $ pear package
69
+ ```
70
+
71
+ to make ` vips-0.1.0.tgz ` , then:
72
+
73
+ ```
74
+ $ pear install vips-0.1.0.tgz
75
+ ```
76
+
77
+ to install.
78
+
79
+ Add:
80
+
81
+ ```
82
+ extension=vips.so
83
+ ```
84
+
85
+ to your ` php.ini ` , perhaps in ` ~/vips/lib/php.ini ` , if you configured php as
86
+ above.
87
+
88
+ ### Using
89
+
90
+ Try:
91
+
92
+ ``` php
93
+ #!/usr/bin/env php
94
+ <?php
95
+ if (!extension_loaded("vips")) {
96
+ dl('vips.' . PHP_SHLIB_SUFFIX);
97
+ }
98
+
99
+ $x = vips_image_new_from_file($argv[1])["out"];
100
+ $x = vips_call("invert", $x)["out"];
101
+ vips_image_write_to_file($x, $argv[2]);
102
+ ?>
103
+ ```
104
+
105
+ And run with:
106
+
107
+ ```
108
+ $ ./try1.php ~/pics/k2.jpg x.tif
109
+ ```
110
+
111
+ See ` examples/ ` .
112
+
113
+ ### Development: regenerate build system
67
114
68
115
Run:
69
116
@@ -73,7 +120,7 @@ $ phpize
73
120
74
121
To scan ` config.m4 ` and your php install and regenerate the build system.
75
122
76
- ### Configuring
123
+ ### Development: configure
77
124
78
125
Run
79
126
@@ -84,7 +131,7 @@ $ ./configure
84
131
Check the output carefully for errors, and obviously check that it found your
85
132
libvips.
86
133
87
- ### Installing
134
+ ### Development: make, test and install
88
135
89
136
Run:
90
137
@@ -116,31 +163,6 @@ Finally, install to your php extensions area with:
116
163
$ make install
117
164
```
118
165
119
- ### Using
120
-
121
- Try:
122
-
123
- ``` php
124
- #!/usr/bin/env php
125
- <?php
126
- if (!extension_loaded("vips")) {
127
- dl('vips.' . PHP_SHLIB_SUFFIX);
128
- }
129
-
130
- $x = vips_image_new_from_file($argv[1])["out"];
131
- $x = vips_call("invert", $x)["out"];
132
- vips_image_write_to_file($x, $argv[2]);
133
- ?>
134
- ```
135
-
136
- And run with:
137
-
138
- ```
139
- $ ./try1.php ~/pics/k2.jpg x.tif
140
- ```
141
-
142
- See ` examples/ ` .
143
-
144
166
### Links
145
167
146
168
http://php.net/manual/en/internals2.php
@@ -150,26 +172,3 @@ https://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-ze
150
172
https://devzone.zend.com/317/extension-writing-part-ii-parameters-arrays-and-zvals/
151
173
152
174
https://devzone.zend.com/446/extension-writing-part-iii-resources/
153
-
154
- ### Packaging
155
-
156
- ```
157
- $ pear package
158
- ```
159
-
160
- to make ` vips-0.1.0.tgz ` , then:
161
-
162
- ```
163
- $ pear install vips-0.1.0.tgz
164
- ```
165
-
166
- to install.
167
-
168
- Add:
169
-
170
- ```
171
- extension=vips.so
172
- ```
173
-
174
- to your ` php.ini ` , perhaps in ` ~/vips/lib/php.ini ` , if you configured php as
175
- above.
0 commit comments