Skip to content

Commit 0137536

Browse files
authored
Create gh-pages branch via GitHub
1 parent c03e7df commit 0137536

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>
2323
<a id="high-level-php-binding-for-libvips" class="anchor" href="#high-level-php-binding-for-libvips" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>High-level PHP binding for libvips</h1>
2424

2525
<p><code>php-vips</code> is a binding for <a href="https://github.com/jcupitt/libvips">libvips</a> for
26-
PHP 7. We have a set of <a href="docs/index.html">formatted API docs</a>. </p>
26+
PHP 7. </p>
2727

2828
<p>libvips is fast and needs little memory. The <a href="https://github.com/jcupitt/php-vips-bench"><code>vips-php-bench</code></a> repository tests
2929
<code>php-vips</code> against <code>imagick</code> and <code>gd</code>. On that test, and on my laptop,
@@ -73,7 +73,8 @@ <h3>
7373
$ ./try1.php ~/pics/k2.jpg x.tif
7474
</code></pre>
7575

76-
<p>See <code>examples/</code>.</p>
76+
<p>See <code>examples/</code>. We have a <a href="https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html">complete set of formatted API
77+
docs</a>.</p>
7778

7879
<h3>
7980
<a id="introduction-to-the-api" class="anchor" href="#introduction-to-the-api" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Introduction to the API</h3>
@@ -109,7 +110,7 @@ <h3>
109110

110111
<div class="highlight highlight-text-html-php"><pre><span class="pl-s1"><span class="pl-smi">$image</span><span class="pl-k">-&gt;</span>writeToFile(<span class="pl-s"><span class="pl-pds">"</span>fred.jpg<span class="pl-pds">"</span></span>, [<span class="pl-s"><span class="pl-pds">"</span>Q<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-c1">90</span>]);</span></pre></div>
111112

112-
<p><code>php-vips</code> comes with full API docs, run:</p>
113+
<p><code>php-vips</code> comes <a href="https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html">with full API docs</a>. To regenerate these from your sources, type:</p>
113114

114115
<pre><code>$ vendor/bin/phpdoc
115116
</code></pre>

params.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "php-vips",
33
"tagline": "php binding for libvips",
4-
"body": "# High-level PHP binding for libvips \r\n\r\n`php-vips` is a binding for [libvips](https://github.com/jcupitt/libvips) for\r\nPHP 7. We have a set of [formatted API docs](docs/index.html). \r\n\r\nlibvips is fast and needs little memory. The [`vips-php-bench`](\r\nhttps://github.com/jcupitt/php-vips-bench) repository tests\r\n`php-vips` against `imagick` and `gd`. On that test, and on my laptop,\r\n`php-vips` is around four times faster than `imagick` and needs 10 times less\r\nmemory. \r\n\r\nPrograms that use libvips don't manipulate images directly, instead they\r\ncreate pipelines of image processing operations starting from a source\r\nimage. When the pipe is connected to a destination, the whole pipeline\r\nexecutes at once and in parallel, streaming the image from source to\r\ndestination in a set of small fragments.\r\n\r\nThis module builds upon the `vips` PHP extension, see:\r\n\r\nhttps://github.com/jcupitt/php-vips-ext\r\n\r\nYou'll need to install that first. It's tested on Linux and macOS --- \r\nWindows would need some work, but should be possible. \r\n\r\n### Example\r\n\r\n```php\r\n#!/usr/bin/env php\r\n<?php\r\nrequire __DIR__ . '/vendor/autoload.php';\r\nuse Jcupitt\\Vips;\r\n\r\n$image = Vips\\Image::newFromFile($argv[1]);\r\n\r\necho \"width = \", $image->width, \"\\n\";\r\n\r\n$image = $image->invert();\r\n\r\n$image->writeToFile($argv[2]);\r\n?>\r\n```\r\n\r\nYou'll need this in your `composer.json`:\r\n\r\n```\r\n \"require\": {\r\n \"jcupitt/vips\" : \"1.0.0\"\r\n }\r\n```\r\n\r\nAnd run with:\r\n\r\n```\r\n$ composer install\r\n$ ./try1.php ~/pics/k2.jpg x.tif\r\n```\r\n\r\nSee `examples/`.\r\n\r\n### Introduction to the API\r\n\r\nAlmost all methods return a new image for the result, so you can chain them.\r\nFor example:\r\n\r\n```php\r\n$image = $image->more(12)->ifthenelse(255, $image);\r\n```\r\n\r\nwill make a mask of pixels greater than 12, then use the mask to set pixels to\r\neither 255 or the original image.\r\n\r\nYou use long, double, array and image as parameters. For example:\r\n\r\n```php\r\n$image = $image->add(2);\r\n```\r\n\r\nto add two to every band element, or:\r\n\r\n```php\r\n$image = $image->add([1, 2, 3]);\r\n```\r\n\r\nto add 1 to the first band, 2 to the second and 3 to the third. Or:\r\n\r\n```php\r\n$image = $image->add($image2);\r\n```\r\n\r\nto add two images. Or: \r\n\r\n```php\r\n$image = $image->add([[1, 2, 3], [4, 5, 6]]);\r\n```\r\n\r\nTo make a 2 x 3 image from the array, then add that image to the original.\r\n\r\nAlmost all methods can take an extra final argument: an array of options.\r\nFor example:\r\n\r\n```php\r\n$image->writeToFile(\"fred.jpg\", [\"Q\" => 90]);\r\n```\r\n\r\n`php-vips` comes with full API docs, run:\r\n\r\n```\r\n$ vendor/bin/phpdoc\r\n```\r\n\r\nAnd look in `docs/`.\r\n\r\nThere are around 300 operations in the library, see the vips docs for an\r\nintroduction:\r\n\r\nhttp://www.vips.ecs.soton.ac.uk/supported/current/doc/html/libvips/\r\n\r\n### How it works\r\n\r\nThe `vips` extension defines a simple but ugly way to call any libvips\r\noperation from PHP. It uses libvips' own introspection facilities\r\nand does not depend on anything else (so no gobject-introspection,\r\nfor example). It's a fairly short 1,600 lines of C.\r\n\r\nThis module is a PHP layer over the ugly `vips` extension that\r\ntries to make a nice interface for programmers. It uses `__call()` and\r\n`__get()` to make all libvips operations appear as methods, and all\r\nlibvips properties as properties of the PHP `Vips\\Image` class.\r\n\r\n### Test and install\r\n\r\n```\r\n$ phpcs --standard=PSR2 src\r\n$ php ~/packages/php/composer.phar install\r\n$ vendor/bin/phpunit\r\n$ vendor/bin/phpdoc\r\n```\r\n\r\n### Regenerate auto docs\r\n\r\n```\r\n$ cd src\r\n$ ../examples/generate_phpdoc.rb\r\n```\r\n\r\n",
4+
"body": "# High-level PHP binding for libvips \r\n\r\n`php-vips` is a binding for [libvips](https://github.com/jcupitt/libvips) for\r\nPHP 7. \r\n\r\nlibvips is fast and needs little memory. The [`vips-php-bench`](\r\nhttps://github.com/jcupitt/php-vips-bench) repository tests\r\n`php-vips` against `imagick` and `gd`. On that test, and on my laptop,\r\n`php-vips` is around four times faster than `imagick` and needs 10 times less\r\nmemory. \r\n\r\nPrograms that use libvips don't manipulate images directly, instead they\r\ncreate pipelines of image processing operations starting from a source\r\nimage. When the pipe is connected to a destination, the whole pipeline\r\nexecutes at once and in parallel, streaming the image from source to\r\ndestination in a set of small fragments.\r\n\r\nThis module builds upon the `vips` PHP extension, see:\r\n\r\nhttps://github.com/jcupitt/php-vips-ext\r\n\r\nYou'll need to install that first. It's tested on Linux and macOS --- \r\nWindows would need some work, but should be possible. \r\n\r\n### Example\r\n\r\n```php\r\n#!/usr/bin/env php\r\n<?php\r\nrequire __DIR__ . '/vendor/autoload.php';\r\nuse Jcupitt\\Vips;\r\n\r\n$image = Vips\\Image::newFromFile($argv[1]);\r\n\r\necho \"width = \", $image->width, \"\\n\";\r\n\r\n$image = $image->invert();\r\n\r\n$image->writeToFile($argv[2]);\r\n?>\r\n```\r\n\r\nYou'll need this in your `composer.json`:\r\n\r\n```\r\n \"require\": {\r\n \"jcupitt/vips\" : \"1.0.0\"\r\n }\r\n```\r\n\r\nAnd run with:\r\n\r\n```\r\n$ composer install\r\n$ ./try1.php ~/pics/k2.jpg x.tif\r\n```\r\n\r\nSee `examples/`. We have a [complete set of formatted API\r\ndocs](https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html).\r\n\r\n### Introduction to the API\r\n\r\nAlmost all methods return a new image for the result, so you can chain them.\r\nFor example:\r\n\r\n```php\r\n$image = $image->more(12)->ifthenelse(255, $image);\r\n```\r\n\r\nwill make a mask of pixels greater than 12, then use the mask to set pixels to\r\neither 255 or the original image.\r\n\r\nYou use long, double, array and image as parameters. For example:\r\n\r\n```php\r\n$image = $image->add(2);\r\n```\r\n\r\nto add two to every band element, or:\r\n\r\n```php\r\n$image = $image->add([1, 2, 3]);\r\n```\r\n\r\nto add 1 to the first band, 2 to the second and 3 to the third. Or:\r\n\r\n```php\r\n$image = $image->add($image2);\r\n```\r\n\r\nto add two images. Or: \r\n\r\n```php\r\n$image = $image->add([[1, 2, 3], [4, 5, 6]]);\r\n```\r\n\r\nTo make a 2 x 3 image from the array, then add that image to the original.\r\n\r\nAlmost all methods can take an extra final argument: an array of options.\r\nFor example:\r\n\r\n```php\r\n$image->writeToFile(\"fred.jpg\", [\"Q\" => 90]);\r\n```\r\n\r\n`php-vips` comes [with full API docs](https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html). To regenerate these from your sources, type:\r\n\r\n```\r\n$ vendor/bin/phpdoc\r\n```\r\n\r\nAnd look in `docs/`.\r\n\r\nThere are around 300 operations in the library, see the vips docs for an\r\nintroduction:\r\n\r\nhttp://www.vips.ecs.soton.ac.uk/supported/current/doc/html/libvips/\r\n\r\n### How it works\r\n\r\nThe `vips` extension defines a simple but ugly way to call any libvips\r\noperation from PHP. It uses libvips' own introspection facilities\r\nand does not depend on anything else (so no gobject-introspection,\r\nfor example). It's a fairly short 1,600 lines of C.\r\n\r\nThis module is a PHP layer over the ugly `vips` extension that\r\ntries to make a nice interface for programmers. It uses `__call()` and\r\n`__get()` to make all libvips operations appear as methods, and all\r\nlibvips properties as properties of the PHP `Vips\\Image` class.\r\n\r\n### Test and install\r\n\r\n```\r\n$ phpcs --standard=PSR2 src\r\n$ php ~/packages/php/composer.phar install\r\n$ vendor/bin/phpunit\r\n$ vendor/bin/phpdoc\r\n```\r\n\r\n### Regenerate auto docs\r\n\r\n```\r\n$ cd src\r\n$ ../examples/generate_phpdoc.rb\r\n```\r\n\r\n",
55
"note": "Don't delete this file! It's used internally to help with page regeneration."
66
}

0 commit comments

Comments
 (0)