Skip to content

Commit 62d18f7

Browse files
committed
update README
more install notes
1 parent b545bae commit 62d18f7

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

README.md

+35-11
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,46 @@ image. When the pipe is connected to a destination, the whole pipeline
1515
executes at once and in parallel, streaming the image from source to
1616
destination in a set of small fragments.
1717

18-
This module builds upon the `vips` PHP extension, see:
18+
This module builds upon the `vips` PHP extension:
1919

2020
https://github.com/jcupitt/php-vips-ext
2121

2222
You'll need to install that first. It's tested on Linux and macOS ---
2323
Windows would need some work, but should be possible.
2424

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+
2558
### Example
2659

2760
```php
@@ -37,18 +70,9 @@ echo "width = ", $image->width, "\n";
3770
$image = $image->invert();
3871

3972
$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-
}
4973
```
5074

51-
And run with:
75+
Run with:
5276

5377
```
5478
$ composer install

0 commit comments

Comments
 (0)