@@ -15,13 +15,46 @@ image. When the pipe is connected to a destination, the whole pipeline
15
15
executes at once and in parallel, streaming the image from source to
16
16
destination in a set of small fragments.
17
17
18
- This module builds upon the ` vips ` PHP extension, see :
18
+ This module builds upon the ` vips ` PHP extension:
19
19
20
20
https://github.com/jcupitt/php-vips-ext
21
21
22
22
You'll need to install that first. It's tested on Linux and macOS ---
23
23
Windows would need some work, but should be possible.
24
24
25
+ See the README there, but briefly:
26
+
27
+ 1 . Install the development version of the underlying libvips library. It's in
28
+ the linux package managers, homebrew and MacPorts, and there are Windows
29
+ binaries on the vips website. For example, on Debian:
30
+
31
+ ```
32
+ sudo apt-get install libvips-dev
33
+ ```
34
+
35
+ Or macOS:
36
+
37
+ ```
38
+ brew install vips
39
+ ```
40
+
41
+ 2 . Install the binary PHP extension:
42
+
43
+ ```
44
+ pecl install vips
45
+ ```
46
+
47
+ You may need to add ` extension=vips.so ` or equivalent to ` php.ini ` , see the
48
+ output of pecl.
49
+
50
+ 3 . Add vips to your ` composer.json ` :
51
+
52
+ ```
53
+ "require": {
54
+ "jcupitt/vips" : "1.0.0"
55
+ }
56
+ ```
57
+
25
58
### Example
26
59
27
60
``` php
@@ -37,18 +70,9 @@ echo "width = ", $image->width, "\n";
37
70
$image = $image->invert();
38
71
39
72
$image->writeToFile($argv[2]);
40
- ?>
41
- ```
42
-
43
- You'll need this in your ` composer.json ` :
44
-
45
- ```
46
- "require": {
47
- "jcupitt/vips" : "1.0.0"
48
- }
49
73
```
50
74
51
- And run with:
75
+ Run with:
52
76
53
77
```
54
78
$ composer install
0 commit comments