1
1
# High-level PHP binding for libvips
2
2
3
- A high-level interface to the libvips image processing library. This
4
- module builds upon the ` vips ` extension, see:
5
-
6
- https://github.com/jcupitt/php-vips-ext
7
-
8
- You'll need to install that first. It's tested on Linux, OS X should work,
9
- Windows would need some work, but should be possible.
3
+ ` php-vips ` is a binding for [ libvips] ( https://github.com/jcupitt/libvips ) , in
4
+ line with [ ruby-vips] ( https://github.com/jcupitt/ruby-vips ) ,
5
+ [ pyvips] ( https://github.com/jcupitt/libvips/tree/master/python ) , the [ libvips
6
+ C++ API] ( https://github.com/jcupitt/libvips/tree/master/cplusplus ) and the
7
+ [ libvips C API] ( https://github.com/jcupitt/libvips/tree/master/libvips ) .
8
+ It aims to be small and simple, and to provide a stable, well-documented
9
+ platform that conforms to [ PHP standards
10
+ recommendations] ( http://www.php-fig.org/psr/ ) .
10
11
11
12
libvips is fast and it can work without needing to have the
12
13
entire image loaded into memory. Programs that use libvips don't
13
14
manipulate images directly, instead they create pipelines of image processing
14
- operations starting from a source image. When the end of the pipe is connected
15
+ operations starting from a source image. When the pipe is connected
15
16
to a destination, the whole pipeline executes at once, streaming the image
16
17
in parallel from source to destination in a set of small fragments.
17
18
@@ -24,11 +25,27 @@ There's a handy blog post explaining [how libvips opens
24
25
files] ( http://libvips.blogspot.co.uk/2012/06/how-libvips-opens-file.html )
25
26
which gives some more background.
26
27
28
+ Extra functionality, such as an image thumbnailer, for example, is
29
+ implemented in repositories which build on this one, and not incorporated
30
+ directly in this code (though see ` examples/ ` ).
31
+ As much of the binding as possible is auto-generated. This reduces
32
+ maintenance effort, increases reliability, and makes it possible to
33
+ reuse core libvips documentation.
34
+
35
+ This
36
+ module builds upon the ` vips ` binary extension, see:
37
+
38
+ https://github.com/jcupitt/php-vips-ext
39
+
40
+ You'll need to install that first. It's tested on Linux; OS X should work;
41
+ Windows would need some work, but should be possible.
42
+
27
43
### Example
28
44
29
45
``` php
30
46
#!/usr/bin/env php
31
47
<?php
48
+ require __DIR__ . '/vendor/autoload.php';
32
49
use Jcupitt\Vips;
33
50
34
51
$image = Vips\Image::newFromFile($argv[1]);
0 commit comments